From 2db54effc094cc5af65828133f80a6c4ee7bf386 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期日, 06 八月 2023 20:16:23 +0800 Subject: [PATCH] bug --- ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java index d1b6836..59b57a0 100644 --- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java +++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java @@ -1024,6 +1024,7 @@ */ @Override public void memberIntegralChange(MemberIntegralChangeDto memberIntegralChangeDto) { + log.info("会员积分变动---"+memberIntegralChangeDto.toString()); MemberTotal memberTotal = memberTotalService.getById(memberIntegralChangeDto.getMemberId()); Integer recordType = memberIntegralChangeDto.getRecordType(); Integer changeType = memberIntegralChangeDto.getChangeType(); @@ -1490,6 +1491,7 @@ */ @Override public void changeMemberTotal(MemberTotalChangeDto memberTotalChangeDto) { + log.info("会员统计变动---"+memberTotalChangeDto.toString()); Member member = this.getByUserId(memberTotalChangeDto.getUserId()); MemberTotal memberTotal = memberTotalService.getById(member.getMemberId()); //积分变动 @@ -1500,6 +1502,17 @@ } else { memberTotal.setUseableIntegral(memberTotal.getUseableIntegral() + memberTotalChangeDto.getChangeIntegral()); memberTotal.setTotalIntegral(memberTotal.getTotalIntegral() + memberTotalChangeDto.getChangeIntegral()); + IntegralRecord integralRecord = new IntegralRecord(); + integralRecord.setDelFlag(0); + integralRecord.setUserId(memberTotalChangeDto.getUserId()); + integralRecord.setChangeType(5); + integralRecord.setCreateTime(new Date()); + integralRecord.setChangeIntegral(memberTotalChangeDto.getChangeIntegral()); + integralRecord.setSurpIntegral(memberTotal.getUseableIntegral()+memberTotalChangeDto.getChangeIntegral()); + integralRecord.setChangeReason("订单【"+memberTotalChangeDto.getOrderNo()+"】获得积分"); + integralRecord.setOrderId(memberTotalChangeDto.getOrderId()); + integralRecord.setOrderNo(memberTotalChangeDto.getOrderNo()); + integralRecordService.saveOrUpdate(integralRecord); } } //消费变动 @@ -1662,6 +1675,7 @@ actEndDate = DateUtils.parseDateToStr("yyyy-MM-dd", DateUtils.addDays(nowDay, activeness.getStartDay())); merTotalDto.setStartDate(actStartDate); merTotalDto.setEndDate(actEndDate); + log.info("活跃度"+merTotalDto.toString()); count = memberMapper.getMerMemberTotalActiveness(merTotalDto); MgtMapIntTotalVo = new MgtMapIntTotalVo(); MgtMapIntTotalVo.setMapKey(activeness.getActivenessName()); @@ -1846,6 +1860,7 @@ */ @Override public Boolean changeIntegral(IntegralChangeDto integralChangeDto){ + log.info("会员积分变动---"+integralChangeDto.toString()); Member member = this.getByUserId(integralChangeDto.getUserId()); Integer integralType = integralChangeDto.getIntegralType(); Integer changeIntegral = integralChangeDto.getChangeIntegral(); -- Gitblit v1.7.1