<?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.stylefeng.guns.modular.system.dao.ReassignMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.Reassign">
|
<id column="id" property="id"/>
|
<result column="orderType" property="orderType"/>
|
<result column="orderId" property="orderId"/>
|
<result column="originalDriverId" property="originalDriverId"/>
|
<result column="originalCarId" property="originalCarId"/>
|
<result column="insertTime" property="insertTime"/>
|
<result column="nowDriverId" property="nowDriverId"/>
|
<result column="nowCarId" property="nowCarId"/>
|
<result column="money" property="money"/>
|
<result column="payType" property="payType"/>
|
<result column="payTime" property="payTime"/>
|
<result column="payOrder" property="payOrder"/>
|
<result column="state" property="state"/>
|
<result column="reason" property="reason"/>
|
<result column="remark" property="remark"/>
|
<result column="completeTime" property="completeTime"/>
|
</resultMap>
|
|
|
<select id="query" resultType="Reassign">
|
select
|
id as id,
|
orderType as orderType,
|
orderId as orderId,
|
originalDriverId as originalDriverId,
|
originalCarId as originalCarId,
|
insertTime as insertTime,
|
nowDriverId as nowDriverId,
|
nowCarId as nowCarId,
|
money as money,
|
payType as payType,
|
payTime as payTime,
|
payOrder as payOrder,
|
state as state,
|
reason as reason,
|
remark as remark,
|
completeTime as completeTime
|
from t_reassign where 1 = 1
|
<if test="null != originalDriverId">
|
and originalDriverId = #{originalDriverId}
|
</if>
|
<if test="null != nowDriverId">
|
and nowDriverId = #{nowDriverId}
|
</if>
|
<if test="null != orderId">
|
and orderId = #{orderId}
|
</if>
|
<if test="null != orderType">
|
and orderType = #{orderType}
|
</if>
|
<if test="null != state">
|
and state in
|
<foreach collection="state" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
</select>
|
|
<select id="queryList" resultType="map">
|
select
|
money as amount,
|
DATE_FORMAT(insertTime, '%Y-%m-%d% %H:%i') as `day`,
|
('改派处罚') as name
|
from t_reassign where payTime is not null and originalDriverId = #{uid} order by insertTime desc limit #{pageNum}, #{size}
|
</select>
|
</mapper>
|