Helius
2020-07-14 3e84a2df7406e3383b51a219283eb0e26a7907d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?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.xcong.excoin.modules.member.dao.AgentReturnDao">
 
    <select id="selectAllNeedMoneyReturn" resultType="com.xcong.excoin.modules.member.entity.AgentReturnEntity">
        select
            referer_id,
            sum(return_amount) return_amount
        from agent_return where is_return=0
        group by referer_id
    </select>
 
    <update id="updateAgentReturnStatusByRefererId">
        update agent_return
        set is_return=#{isReturn}
        where referer_id=#{refererId}
    </update>
</mapper>