Pu Zhibing
2025-03-28 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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.BalanceUsageRecordMapper">
 
 
    
    <select id="queryBalanceUsageRecord" resultType="map">
        select
        DATE_FORMAT(createTime, '%Y-%m-%d') as createTime,
        money,
        purpose
        from t_balance_usage_record where type = #{type} and driverId = #{driverId} and purpose != 6 order by createTime desc limit #{pageNum}, #{size}
    </select>
    
    
    
    <select id="queryBalanceUsageRecordSum" resultType="double">
        select ifnull(sum(money), 0) from t_balance_usage_record where type = #{type} and driverId = #{driverId} and purpose != 6
    </select>
</mapper>