admin
2020-05-06 24a8d17e007545f7426c48352109aa1a9c6587ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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.yeshi.fanli.dao.mybatis.homemodule.SpecialLabelMapMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.SpecialLabelMap">
    <id column="slm_id" property="id" jdbcType="BIGINT"/>
    <result column="slm_spid" property="spid" jdbcType="BIGINT"/>
    <result column="slm_lab_id" property="labId" jdbcType="BIGINT"/>
    <result column="slm_create_time" property="createTime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">slm_id,slm_spid,slm_lab_id,slm_create_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_special_label_map where slm_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_special_label_map where slm_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialLabelMap" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_label_map (slm_id,slm_spid,slm_lab_id,slm_create_time) values (#{id,jdbcType=BIGINT},#{spid,jdbcType=BIGINT},#{labId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialLabelMap" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_label_map
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">slm_id,</if>
      <if test="spid != null">slm_spid,</if>
      <if test="labId != null">slm_lab_id,</if>
      <if test="createTime != null">slm_create_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="spid != null">#{spid,jdbcType=BIGINT},</if>
      <if test="labId != null">#{labId,jdbcType=BIGINT},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialLabelMap">update yeshi_ec_special_label_map set slm_spid = #{spid,jdbcType=BIGINT},slm_lab_id = #{labId,jdbcType=BIGINT},slm_create_time = #{createTime,jdbcType=TIMESTAMP} where slm_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialLabelMap">update yeshi_ec_special_label_map
    <set>
      <if test="spid != null">slm_spid=#{spid,jdbcType=BIGINT},</if>
      <if test="labId != null">slm_lab_id=#{labId,jdbcType=BIGINT},</if>
      <if test="createTime != null">slm_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
    </set> where slm_id = #{id,jdbcType=BIGINT}
  </update>
  
  <delete id="deleteBySpecialIds" parameterType="java.util.List">
    delete from yeshi_ec_special_label_map 
    WHERE slm_spid in <foreach collection="list" item="item" open="(" close=")" separator=",">#{item}</foreach>
  </delete>
  
  
</mapper>