<?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.panzhihua.service_grid.dao.EventTransferRecordMapper">
|
|
<resultMap id="baseResult" type="com.panzhihua.service_grid.model.dos.EventTransferRecordDO">
|
<result property="id" column="id"/>
|
<result property="eventId" column="event_id"/>
|
<result property="fromType" column="from_type"/>
|
<result property="fromId" column="from_id"/>
|
<result property="fromName" column="from_name"/>
|
<result property="toType" column="to_type"/>
|
<result property="toId" column="to_id"/>
|
<result property="toName" column="to_name"/>
|
<result property="processResult" column="process_result"/>
|
<result property="processDate" column="process_date"/>
|
<result property="createAt" column="create_at"/>
|
</resultMap>
|
|
<sql id="columns">
|
<![CDATA[
|
id,event_id,from_type,from_id,from_name,to_type,to_id,to_name,process_result,process_date,create_at
|
]]>
|
</sql>
|
|
|
<select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventTransferRecordVO"
|
parameterType="com.panzhihua.common.model.dtos.grid.PageEventTransferRecordDTO">
|
SELECT <include refid="columns" />
|
FROM event_transfer_record
|
<where>
|
<if test="pageEventTransferRecordDTO.id!=null">
|
AND id = #{pageEventTransferRecordDTO.id}
|
</if>
|
<if test="pageEventTransferRecordDTO.eventId!=null">
|
AND event_id = #{pageEventTransferRecordDTO.eventId}
|
</if>
|
<if test="pageEventTransferRecordDTO.fromType!=null">
|
AND from_type = #{pageEventTransferRecordDTO.fromType}
|
</if>
|
<if test="pageEventTransferRecordDTO.from!=null">
|
AND from_id = #{pageEventTransferRecordDTO.fromId}
|
</if>
|
<if test="pageEventTransferRecordDTO.fromName!=null">
|
AND from_name = #{pageEventTransferRecordDTO.fromName}
|
</if>
|
<if test="pageEventTransferRecordDTO.toType!=null">
|
AND to_type = #{pageEventTransferRecordDTO.toType}
|
</if>
|
<if test="pageEventTransferRecordDTO.to!=null">
|
AND to_id = #{pageEventTransferRecordDTO.toId}
|
</if>
|
<if test="pageEventTransferRecordDTO.toName!=null">
|
AND to_name = #{pageEventTransferRecordDTO.toName}
|
</if>
|
<if test="pageEventTransferRecordDTO.processResult!=null">
|
AND process_result = #{pageEventTransferRecordDTO.processResult}
|
</if>
|
<if test="pageEventTransferRecordDTO.processDateBegin!=null">
|
AND process_date >= #{pageEventTransferRecordDTO.processDateBegin}
|
</if>
|
<if test="pageEventTransferRecordDTO.processDateEnd!=null">
|
AND process_date <= #{pageEventTransferRecordDTO.processDateEnd}
|
</if>
|
<if test="pageEventTransferRecordDTO.createAtBegin!=null">
|
AND create_at >= #{pageEventTransferRecordDTO.createAtBegin}
|
</if>
|
<if test="pageEventTransferRecordDTO.createAtEnd!=null">
|
AND create_at <= #{pageEventTransferRecordDTO.createAtEnd}
|
</if>
|
</where>
|
<if test="pageEventTransferRecordDTO.sortColumns!=null">
|
ORDER BY ${pageEventTransferRecordDTO.sortColumns} ${pageEventTransferRecordDTO.sortType}
|
</if>
|
</select>
|
|
</mapper>
|