DracImConfigMapper.xml 4.15 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.DracImConfigMapper">
    <resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.DracImConfig">
        <!--
          WARNING - @mbg.generated
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
        <result column="config_type" jdbcType="INTEGER" property="configType"/>
        <result column="staff_ids" jdbcType="VARCHAR" property="staffIds"/>
        <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
        <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
        <result column="template_id" jdbcType="INTEGER" property="templateId"/>
        <result column="marketing_id" jdbcType="INTEGER" property="marketingId"/>
        <result column="marketing_type" jdbcType="INTEGER" property="marketingType"/>
        <result column="marketing_url" jdbcType="VARCHAR" property="marketingUrl"/>
        <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
        <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="content" jdbcType="LONGVARCHAR" property="content"/>
    </resultMap>
    <resultMap id="resultMap" type="cn.com.glsx.entmicro.model.response.DracImConfigResponse">
        <!--
          WARNING - @mbg.generated
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
        <result column="config_type" jdbcType="INTEGER" property="configType"/>
        <result column="staff_ids" jdbcType="VARCHAR" property="staffIds"/>
        <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
        <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
        <result column="template_id" jdbcType="INTEGER" property="templateId"/>
        <result column="marketing_id" jdbcType="INTEGER" property="marketingId"/>
        <result column="marketing_type" jdbcType="INTEGER" property="marketingType"/>
        <result column="marketing_url" jdbcType="VARCHAR" property="marketingUrl"/>
        <result column="content" jdbcType="LONGVARCHAR" property="content"/>
        <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
        <result column="tagging" jdbcType="VARCHAR" property="tagging"/>
        <result column="auto_welcome" jdbcType="VARCHAR" property="autoWelcome"/>
        <result column="welcome_json" jdbcType="VARCHAR" property="welcomeJson"/>
    </resultMap>

    <sql id="Base_Column_List">
        <!--
          WARNING - @mbg.generated
        -->
        id, merchant_id, config_type, staff_ids, start_time, end_time, template_id, marketing_id,
        marketing_type, marketing_url, del_flag, created_by, created_time, updated_by, updated_time
    </sql>
    <sql id="Blob_Column_List">
        <!--
          WARNING - @mbg.generated
        -->
        content
    </sql>
    <select id="findByTypeAndMerchantId" resultMap="resultMap">
        select * from drac_im_config where 1=1 AND config_type in (1,2)
        <if test="dracImConfigRequest.configType != null">
            and config_type=#{dracImConfigRequest.configType}
        </if>
        <if test="dracImConfigRequest.merchantId != null">
            and merchant_id=
            #{dracImConfigRequest.merchantId}
        </if>

    </select>
    <select id="findByTypeAndMerchantIds" resultMap="resultMap">
        select * from drac_im_config where 1=1
        <if test="dracImConfigRequest.configType != null">
            and config_type=#{dracImConfigRequest.configType}
        </if>
        <if test="dracImConfigRequest.merchantId != null">
            and merchant_id=
            #{dracImConfigRequest.merchantId}
        </if>
    </select>
</mapper>