xiaoyong931011
2022-03-01 c0902e7e9865781ac85b4796fd452354065ce089
1
2
3
4
5
6
7
8
9
10
11
12
13
<?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.coin.dao.ZhiYaDao">
 
    <select id="selectByMemberId" resultType="com.xcong.excoin.modules.coin.entity.ZhiYaEntity">
        SELECT *  FROM zhi_ya a where a.member_id= #{memberId}
    </select>
 
    <select id="selectSumRewardByMemberIdAndRecordIdAndType" resultType="long">
        SELECT ifnull(sum(a.reward_amout),0)  FROM zhiya_reward a where a.member_id= #{memberId} and a.type=  #{type} and a.record_id=  #{recordId}
    </select>
 
</mapper>