935090232@qq.com
2021-03-21 799622ea4d37aa6bb9fee457967532aa93d18594
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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.matrix.system.score.dao.ScoreVipDetailDao">
 
    <select id="selectUserTotalScore" resultType="java.lang.Integer">
        select IFNULL(sum(IFNULL( remain_score, 0 )),0) from score_vip_detail
        <where>
        and state=1
            <if test="openId !=null">
                and open_id=#{openId}
            </if>
            <if test="vipId !=null">
                and vip_id=#{vipId}
            </if>
        </where>
    </select>
 
    <select id="selectEffectiveScore" resultType="com.matrix.system.score.entity.ScoreVipDetail">
        select  *  from score_vip_detail where open_id=#{openId} and  state=1 order by create_time
 
    </select>
 
</mapper>