KKSU
2024-05-07 4aabd0b6af210226e61136bb494252fcb10022fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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.DappAgentReturnFlowDao">
 
    <select id="selectTotalAmountByMemberId" resultType="java.math.BigDecimal">
        select IFNULL(sum(amount),0)
        from dapp_agent_return_flow
        where agent_member_id=#{memberId}
        <if test="isReturn!=null">
            and is_return=#{isReturn}
        </if>
    </select>
 
    <update id="updateIsReturnByMemberId">
        update dapp_agent_return_flow
        set is_return=#{isReturn}
        where member_id=#{memberId}
    </update>
</mapper>