<?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.TWithdrawalMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TWithdrawal">
|
<id column="id" property="id"/>
|
<result column="driverId" property="driverId"/>
|
<result column="receivePaymentName" property="receivePaymentName"/>
|
<result column="receivePaymentAccount" property="receivePaymentAccount"/>
|
<result column="withdrawalType" property="withdrawalType"/>
|
<result column="withdrawalMoney" property="withdrawalMoney"/>
|
<result column="withdrawalTime" property="withdrawalTime"/>
|
<result column="status" property="status"/>
|
<result column="openBank" property="openBank"/>
|
<result column="remark" property="remark"/>
|
<result column="receiptVoucher" property="receiptVoucher"/>
|
</resultMap>
|
<select id="getWithdrawalList" resultType="java.util.Map">
|
select
|
t.id,
|
t.driverId,
|
t.receivePaymentName,
|
t.receivePaymentAccount,
|
t.withdrawalType,
|
t.withdrawalMoney,
|
t.withdrawalTime,
|
t.status,
|
t.openBank,
|
t.remark,
|
t.receiptVoucher,
|
d.name as driverName,
|
d.phone as driverPhone,
|
d.balance as driverBalance
|
from t_withdrawal t
|
left join t_driver d on t.driverId = d.id
|
<where>
|
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
|
and t.withdrawalTime >= CONCAT(#{beginTime},' 00:00:00') and t.withdrawalTime <= CONCAT(#{endTime},' 23:59:59')
|
</if>
|
<if test="driverName != null and driverName != ''">
|
and d.name like concat('%',#{driverName},'%')
|
</if>
|
<if test="status != null">
|
and t.status = #{status}
|
</if>
|
</where>
|
order by t.withdrawalTime desc
|
</select>
|
<select id="excel" resultType="java.util.Map">
|
select
|
t.id,
|
t.driverId,
|
t.receivePaymentName,
|
t.receivePaymentAccount,
|
t.withdrawalType,
|
t.withdrawalMoney,
|
t.withdrawalTime,
|
t.status,
|
t.openBank,
|
t.remark,
|
t.receiptVoucher,
|
d.name as driverName,
|
d.phone as driverPhone,
|
d.balance as driverBalance
|
from t_withdrawal t
|
left join t_driver d on t.driverId = d.id
|
<where>
|
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
|
and t.withdrawalTime >= CONCAT(#{beginTime},' 00:00:00') and t.withdrawalTime <= CONCAT(#{endTime},' 23:59:59')
|
</if>
|
<if test="driverName != null and driverName != ''">
|
and d.name like concat('%',#{driverName},'%')
|
</if>
|
<if test="status != null">
|
and t.status = #{status}
|
</if>
|
</where>
|
order by t.withdrawalTime desc
|
</select>
|
|
|
</mapper>
|