UserCustomerBehaviorMapper.xml 2.14 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.dj.system.mapper.UserCustomerBehaviorMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.system.model.UserCustomerBehavior" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="employee_id" property="employeeId" jdbcType="INTEGER" />
    <result column="merchant_id" property="merchantId" jdbcType="INTEGER" />
    <result column="object_id" property="objectId"/>
    <result column="nick_name" property="nickName" jdbcType="VARCHAR" />
    <result column="logo" property="logo" jdbcType="VARCHAR" />
    <result column="open_id" property="openId" jdbcType="VARCHAR" />
    <result column="type" property="type" jdbcType="TINYINT" />
    <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
    <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
    <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
    <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
    <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
  </resultMap>
  
  <resultMap id="DTOResultMap" type="cn.com.glsx.dj.system.dto.UserCustomerBehaviorDTO" extends="BaseResultMap">
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, employee_id, merchant_id,object_id, nick_name, logo, open_id, type, created_by, created_date, 
    updated_by, updated_date, deleted_flag
  </sql>
  
  <select id="listWithPage" parameterType="cn.com.glsx.dj.system.dto.UserCustomerBehaviorDTO" resultMap="DTOResultMap">
  	select <include refid="Base_Column_List"/> from dj_system_user_customer_behavior
  	<where>
  		deleted_flag='N'
  		<if test="employeeId != null">
  			and employee_id = #{employeeId}
  		</if>
  		<if test="merchantId != null">
  			and merchant_id = #{merchantId}
  		</if>
  		<if test="type != null">
  			and type = #{type}
  		</if>
  	</where>
  	order by updated_date desc
  </select>
</mapper>