From 972d3bc71115ec977dccf835fbcd148da3bcc86c Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期二, 03 九月 2019 16:41:49 +0800 Subject: [PATCH] 统计可用的免单券数量-countUsableFreeCouponForBuy --- fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java index 0a0e335..540e7a3 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java @@ -209,7 +209,12 @@ IntegralTaskRecord record = integralTaskRecordMapper.selectByPrimaryKey(id); if (record == null) continue; - + + // 宸查鍙� + Integer state = record.getState(); + if (state != null && state == 1) + continue; + if (addDetail(uid, record)) totalGoldCoin += record.getGoldCoin(); } @@ -291,19 +296,18 @@ } detail.setTitle(taskClass.getName() + "-绗�" + num + "澶�"); } else { - int num = 0; FrequencyEnum frequency = integralTask.getFrequency(); if (frequency == FrequencyEnum.everyday) { - num = integralTaskRecordMapper.countByTaskIdTodayNum(uid, taskId, + int num = integralTaskRecordMapper.countByTaskIdTodayNum(uid, taskId, TimeUtil.getWholeTime(record.getCreateTime().getTime())); + if (num <= 0) + num = 1; + String title = taskClass.getName() + "-" + integralTask.getName() + "-绗�" + num + "娆�"; + detail.setTitle(title); } else if (frequency == FrequencyEnum.onlyOne) { - num = 1; + String title = taskClass.getName() + "-" + integralTask.getName(); + detail.setTitle(title); } - - if (num <= 0) - num = 1; - String title = taskClass.getName() + "-" + integralTask.getName() + "-绗�" + num + "娆�"; - detail.setTitle(title); } detail.setUid(uid); @@ -411,8 +415,8 @@ msgOther.setSource("涓�绾ч槦鍛橀绗斾笅鍗曪紝绯荤粺濂栧姳閭�璇蜂汉閲戝竵"); msgOther.setNum(addGoldCoin + "閲戝竵"); msgOther.setTotal(goldCoin + "閲戝竵"); - msgOther.setExplain("浠呬竴绾ч槦鍛橀绗斾笅鍗曞鍔憋紙宸插埌璐︼級"); - userOtherMsgNotificationService.firstOrderRewardMsg(uid, "", msgOther); + msgOther.setExplain("浠呬竴绾ч槦鍛橀绗斾笅鍗曞鍔�"); + userOtherMsgNotificationService.firstOrderRewardMsg(uid, "璁㈠崟宸插埌璐﹀悗绯荤粺浼氳嚜鍔ㄥ鍔�", msgOther); } } -- Gitblit v1.8.0