From 9a1e5d285c9e67b97c1f79bb393404a50ae6aa72 Mon Sep 17 00:00:00 2001 From: jyy <935090232@qq.com> Date: Tue, 13 Apr 2021 17:47:23 +0800 Subject: [PATCH] 修改bug2 --- zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml index 47664d6..bc19396 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml @@ -5,7 +5,7 @@ <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} @@ -19,4 +19,13 @@ </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> \ No newline at end of file -- Gitblit v1.9.1