123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?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.kmall.api.dao.ApiUserCollectionMapper" >
- <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallUserCollection" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="user_id" property="userId" jdbcType="INTEGER" />
- <result column="good_id" property="goodId" jdbcType="INTEGER" />
- <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
- <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
- <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, user_id, good_id, creater_sn, create_time, moder_sn, mod_time, tstm
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from mall_user_collection
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="delete" parameterType="java.lang.Integer" >
- delete from mall_user_collection
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="save" parameterType="com.kmall.api.entity.MallUserCollection" useGeneratedKeys="true" keyProperty="id">
- insert into mall_user_collection
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="userId != null" >
- user_id,
- </if>
- <if test="goodId != null" >
- good_id,
- </if>
- <if test="createrSn != null" >
- creater_sn,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="moderSn != null" >
- moder_sn,
- </if>
- <if test="modTime != null" >
- mod_time,
- </if>
- <if test="tstm != null" >
- tstm,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="userId != null" >
- #{userId,jdbcType=INTEGER},
- </if>
- <if test="goodId != null" >
- #{goodId,jdbcType=INTEGER},
- </if>
- <if test="createrSn != null" >
- #{createrSn,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="moderSn != null" >
- #{moderSn,jdbcType=VARCHAR},
- </if>
- <if test="modTime != null" >
- #{modTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tstm != null" >
- #{tstm,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="update" parameterType="com.kmall.api.entity.MallUserCollection" >
- update mall_user_collection
- <set >
- <if test="userId != null" >
- user_id = #{userId,jdbcType=INTEGER},
- </if>
- <if test="goodId != null" >
- good_id = #{goodId,jdbcType=INTEGER},
- </if>
- <if test="createrSn != null" >
- creater_sn = #{createrSn,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="moderSn != null" >
- moder_sn = #{moderSn,jdbcType=VARCHAR},
- </if>
- <if test="modTime != null" >
- mod_time = #{modTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tstm != null" >
- tstm = #{tstm,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|