Commit 774135af by 吕明尚

Merge branch 'dev' into test

parents b4c1426f 7cf8e60f
...@@ -99,7 +99,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe ...@@ -99,7 +99,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
); );
if (ObjectUtil.isNotEmpty(oldPointActivities)) { if (ObjectUtil.isNotEmpty(oldPointActivities)) {
if (ObjectUtil.isNotEmpty(oldPointActivities.getLastConsumptionTime())) { if (ObjectUtil.isNotEmpty(oldPointActivities.getLastConsumptionTime())) {
if (DateUtils.addHours(oldPointActivities.getLastConsumptionTime(), pointActivitiesConf.getTimeInterval()).compareTo(new Date()) >= 0 if (DateUtils.addHours(oldPointActivities.getLastConsumptionTime(), pointActivitiesConf.getTimeInterval()).compareTo(new Date()) <= 0
&& !oldPointActivities.getPoints().equals(pointActivitiesConf.getPointsRequired())) { && !oldPointActivities.getPoints().equals(pointActivitiesConf.getPointsRequired())) {
oldPointActivities.setPoints(oldPointActivities.getPoints() + YesNoEnum.yes.getIndex()); oldPointActivities.setPoints(oldPointActivities.getPoints() + YesNoEnum.yes.getIndex());
oldPointActivities.setLastConsumptionTime(sOrder.getPayTime()); oldPointActivities.setLastConsumptionTime(sOrder.getPayTime());
...@@ -168,25 +168,27 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe ...@@ -168,25 +168,27 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
List<PointActivities> activitiesList = List<PointActivities> activitiesList =
pointActivitiesMapper.selectList(new LambdaQueryWrapper<PointActivities>() pointActivitiesMapper.selectList(new LambdaQueryWrapper<PointActivities>()
.eq(PointActivities::getConsumerId, info.getId()) .eq(PointActivities::getConsumerId, info.getId())
//当前年月,次数未到的 or 领取优惠券未领取,年月在上个月 //当前年月,活动次数未完成
.eq(PointActivities::getCurrentYear, LocalDate.now().getYear()) .eq(PointActivities::getCurrentYear, LocalDate.now().getYear())
.eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue()) .eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue())
.lt(PointActivities::getPoints, 4) .lt(PointActivities::getPoints, 4)
.eq(PointActivities::getIsReceive, YesNoEnum.no.getIndex()) .eq(PointActivities::getIsReceive, YesNoEnum.no.getIndex())
.eq(PointActivities::getCouponReceived, YesNoEnum.no.getIndex()) .eq(PointActivities::getCouponReceived, YesNoEnum.no.getIndex())
.or() .or()
//当前年月,活动次数以完成未领取的
.eq(PointActivities::getCurrentYear, LocalDate.now().getYear()) .eq(PointActivities::getCurrentYear, LocalDate.now().getYear())
.eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue()) .eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue())
.eq(PointActivities::getPoints, 4) .eq(PointActivities::getPoints, 4)
.eq(PointActivities::getIsReceive, YesNoEnum.yes.getIndex()) .eq(PointActivities::getIsReceive, YesNoEnum.yes.getIndex())
.eq(PointActivities::getCouponReceived, YesNoEnum.no.getIndex()) .eq(PointActivities::getCouponReceived, YesNoEnum.no.getIndex())
.or() .or()
//或者夸年 //夸年的,已完成,未领取
.eq(PointActivities::getCurrentYear, LocalDate.now().getYear() - 1) .eq(PointActivities::getCurrentYear, LocalDate.now().getYear() - 1)
.eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue() + 11) .eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue() + 11)
.eq(PointActivities::getIsReceive, YesNoEnum.yes.getIndex()) .eq(PointActivities::getIsReceive, YesNoEnum.yes.getIndex())
.eq(PointActivities::getCouponReceived, YesNoEnum.no.getIndex()) .eq(PointActivities::getCouponReceived, YesNoEnum.no.getIndex())
.or() .or()
//当前年,上个月份,已完成,未领取的
.eq(PointActivities::getCurrentYear, LocalDate.now().getYear()) .eq(PointActivities::getCurrentYear, LocalDate.now().getYear())
.eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue() - 1) .eq(PointActivities::getCurrentMonth, LocalDate.now().getMonthValue() - 1)
.eq(PointActivities::getIsReceive, YesNoEnum.yes.getIndex()) .eq(PointActivities::getIsReceive, YesNoEnum.yes.getIndex())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment