xiaoyong931011
2023-08-11 163ee7c4bd868557fb7d7399feaa03d6d9660526
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?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="cc.mrbird.febs.dapp.mapper.DappChargeUsdtMapper">
 
    <select id="selectByMaxAmountMemberId" resultType="java.math.BigDecimal">
        select ifnull(MAX(amount),0)
        from dapp_charge_usdt
        where member_id = #{memberId}
    </select>
 
    <select id="selectBySumAmountMemberId" resultType="java.math.BigDecimal">
        select ifnull(sum(amount),0)
        from dapp_charge_usdt
        where member_id = #{memberId}
    </select>
 
    <select id="selectBySumAmountMemberIdAndDate" resultType="java.math.BigDecimal">
        select ifnull(sum(amount),0)
        from dapp_charge_usdt
        where member_id = #{memberId}
        and date_format(create_time, '%Y-%m-%d') = #{dateTime}
    </select>
 
</mapper>