| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.fs.his.mapper.FsIntegralExchangeMapper">
- <resultMap type="FsIntegralExchange" id="FsIntegralExchangeResult">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="integral" column="integral" />
- <result property="createTime" column="create_time" />
- <result property="status" column="status" />
- <result property="phone" column="phone" />
- <result property="nickName" column="nick_name" />
- </resultMap>
- <sql id="selectFsIntegralExchangeVo">
- select id, user_id, integral, create_time, status, phone, nick_name from fs_integral_exchange
- </sql>
- <select id="selectFsIntegralExchangeList" parameterType="FsIntegralExchange" resultMap="FsIntegralExchangeResult">
- <include refid="selectFsIntegralExchangeVo"/>
- <where>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="integral != null "> and integral = #{integral}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
- <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
- </where>
- </select>
- <select id="selectFsIntegralExchangeById" parameterType="Long" resultMap="FsIntegralExchangeResult">
- <include refid="selectFsIntegralExchangeVo"/>
- where id = #{id}
- </select>
- <insert id="insertFsIntegralExchange"
- parameterType="com.fs.his.domain.FsIntegralExchange"
- useGeneratedKeys="true"
- keyProperty="id">
- insert into fs_integral_exchange
- (user_id, integral, create_time, status, phone, nick_name)
- values
- (#{userId}, #{integral}, #{createTime}, #{status}, #{phone}, #{nickName})
- </insert>
- <update id="updateFsIntegralExchange" parameterType="FsIntegralExchange">
- update fs_integral_exchange
- <trim prefix="SET" suffixOverrides=",">
- <if test="userId != null">user_id = #{userId},</if>
- <if test="integral != null">integral = #{integral},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="status != null">status = #{status},</if>
- <if test="phone != null">phone = #{phone},</if>
- <if test="nickName != null">nick_name = #{nickName},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteFsIntegralExchangeById" parameterType="Long">
- delete from fs_integral_exchange where id = #{id}
- </delete>
- <delete id="deleteFsIntegralExchangeByIds" parameterType="String">
- delete from fs_integral_exchange where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|