| | |
| | | <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 |
| | | select IFNULL(sum(IFNULL(remain_score, 0 )),0) from score_vip_detail |
| | | where state=1 and vip_id=#{vipId} |
| | | |
| | | |
| | |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectInvalidaVipScore" resultType="com.matrix.system.score.entity.ScoreVipDetail"> |
| | | select * from score_vip_detail where state=1 and remain_score>0 and validite_time <![CDATA[ < now()]]> |
| | | </select> |
| | | |
| | | <update id="invalidVipScore"> |
| | | update score_vip_detail set state = 2 , remain_score=0 where state=1 and validite_time <![CDATA[ < now()]]> |
| | | </update> |
| | | |
| | | </mapper> |