ScrmActivityReportLogMapper.xml 2.5 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.ScrmActivityReportLogMapper">
  <resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.dto.activityreport.ScrmActivityReportLogDTO">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
    <result column="business_scenario" jdbcType="VARCHAR" property="businessScenario" />
    <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
    <result column="push_time" jdbcType="TIMESTAMP" property="pushTime" />
    <result column="push_type" jdbcType="INTEGER" property="pushType" />
    <result column="group_chat_name" jdbcType="VARCHAR" property="groupChatName" />
    <result column="park_store_name" jdbcType="VARCHAR" property="parkStoreName" />
    <result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
    <result column="del_flag" jdbcType="TINYINT" 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="text" jdbcType="LONGVARCHAR" property="text" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, merchant_id, business_scenario, merchant_name, push_time, push_type, group_chat_name, file_url,
    park_store_name, del_flag, created_by, created_time, updated_by, updated_time, text
  </sql>

  <select id="getPage" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from scrm_activity_report_log t
    where t.del_flag = 0
    <if test="condition.searchName != null and condition.searchName != ''">
      and concat(IFNULL(t.`group_chat_name`,''),IFNULL(t.`merchant_name`,'')) like concat('%',#{condition.searchName},'%')
    </if>
    <if test="condition.startTime != null">
      and t.push_time <![CDATA[>=]]> #{condition.startTime}
    </if>
    <if test="condition.endTime != null">
      and t.push_time <![CDATA[<=]]> #{condition.endTime}
    </if>
    <if test="condition.pushType != null">
      and t.push_type = #{condition.pushType}
    </if>
    order by t.push_time desc
  </select>
</mapper>