无关风月
2025-01-14 e6d027eb78f32fec9a9788976f694a85fa3b768a
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TWithdrawalMapper.xml
@@ -47,6 +47,37 @@
        </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 &gt;= CONCAT(#{beginTime},' 00:00:00') and t.withdrawalTime &lt;= 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>