DracScrmWelcomeConfigMapper.xml 2.94 KB
<?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="cn.com.glsx.entmicro.mapper.DracScrmWelcomeConfigMapper">
  <resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.DracScrmWelcomeConfigEntity">
    <!--@Table scrm_group_one-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="business_uuid" jdbcType="VARCHAR" property="businessUuid" />
    <result column="business_desc" jdbcType="VARCHAR" property="businessDesc" />
    <result column="att_type" jdbcType="INTEGER" property="attType" />
    <result column="att_num" jdbcType="INTEGER" property="attNum" />
    <result column="att_content" jdbcType="VARCHAR" property="attContent" />
    <result column="media_id" jdbcType="VARCHAR" property="mediaId" />
    <result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
    <result column="created_by" jdbcType="INTEGER" property="createdBy" />
    <result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
    <result column="updated_by" jdbcType="INTEGER" property="updatedBy" />
    <result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
  </resultMap>

  <resultMap id="resultMap" type="cn.com.glsx.entmicro.model.response.drainage.DracScrmWelcomeConfigEntityVO">
    <!--@Table scrm_group_one-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="business_uuid" jdbcType="VARCHAR" property="businessUuid" />
    <result column="business_desc" jdbcType="VARCHAR" property="businessDesc" />
    <result column="att_type" jdbcType="INTEGER" property="attType" />
    <result column="att_num" jdbcType="INTEGER" property="attNum" />
    <result column="att_content" jdbcType="VARCHAR" property="attContent" />
    <result column="media_id" jdbcType="VARCHAR" property="mediaId" />
    <result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
  </resultMap>

  <!-- 基础返回数据 -->
  <sql id="Base_Column_List">
    id, business_uuid, business_desc, att_type, att_num, att_content, media_id, created_by, created_time, updated_by, updated_time, del_flag
  </sql>

  <delete id="deleteByUuid">
     delete from drac_scrm_welcome_config where business_uuid=#{uuid} and business_desc=#{businessDesc}
  </delete>

  <delete id="deleteByBatchUuid">
    delete from drac_scrm_welcome_config
    where business_desc=#{businessDesc}
    and business_uuid in
    <foreach collection="uuidList" separator="," open="(" close=")" item="item">
      #{item}
    </foreach>
  </delete>

  <select id="getListByUuid" resultMap="resultMap">
    select * from drac_scrm_welcome_config
    where business_uuid in
    <foreach collection="uuidList" separator="," open="(" close=")" item="item">
      #{item}
    </foreach>
    and business_desc = #{businessDesc}
    and del_flag = 0
  </select>

</mapper>