From b3b3987e17a80b4fe6bc29f3835429058eb2e0fc Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Tue, 21 Mar 2023 10:26:59 +0800 Subject: [PATCH] 后台修改 --- src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java index 45659b6..ff9da3d 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java @@ -47,6 +47,7 @@ private final SqlSessionTemplate sqlSessionTemplate; private final IApiMallMemberWalletService memberWalletService; private final MallMoneyFlowMapper mallMoneyFlowMapper; + private final MallMqRecordMapper mallMqRecordMapper; @Override @Transactional(rollbackFor = Exception.class) @@ -222,7 +223,12 @@ sharePerkAmount, MoneyFlowTypeEnum.DYNAMIC_ACHIEVE.getValue(), mallOrderInfo.getOrderNo(), - FlowTypeEnum.BALANCE.getValue()); + "直推奖", + "补贴额度:"+totalScore, + memberId, + 2, + FlowTypeEnum.BALANCE.getValue(), + 1); } } /** @@ -264,6 +270,11 @@ long end = System.currentTimeMillis(); log.info("============订单:{},时间:{}===========",mallOrderInfo.getOrderNo(),(end - start)/1000); + MallMqRecord mallMqRecord = mallMqRecordMapper.selectByOrderId(orderId); + if(ObjectUtil.isNotEmpty(mallMqRecord)){ + mallMqRecord.setState(1); + mallMqRecordMapper.updateById(mallMqRecord); + } } /** @@ -340,6 +351,8 @@ if(CollUtil.isNotEmpty(mallMemberStars)){ List<Long> mallMemberStarIds = mallMemberStars.stream().map(MallMember::getId).collect(Collectors.toList()); + //排除掉本身 + mallMemberStarIds.remove(memberId); //当前等级的总贡献点 List<MallMemberWallet> mallMemberWallets = mallMemberWalletMapper.selectMemberWalletsByIds(mallMemberStarIds); Integer starSum = mallMemberWallets.stream().mapToInt(MallMemberWallet::getStar).sum(); @@ -387,6 +400,7 @@ mallMoneyFlow.setOrderNo(orderNo); mallMoneyFlow.setRtMemberId(memberId); mallMoneyFlow.setStatus(2); + mallMoneyFlow.setRemark("补贴额度:"+mallMemberWallet.getTotalScore()); mallMoneyFlow.setFlowType(FlowTypeEnum.BALANCE.getValue()); mallMoneyFlows.add(mallMoneyFlow); } @@ -463,6 +477,7 @@ mallMoneyFlow.setOrderNo(orderNo); mallMoneyFlow.setRtMemberId(memberId); mallMoneyFlow.setStatus(2); + mallMoneyFlow.setRemark("补贴额度:"+mallMemberWallet.getTotalScore()); mallMoneyFlow.setFlowType(FlowTypeEnum.BALANCE.getValue()); mallMoneyFlows.add(mallMoneyFlow); } -- Gitblit v1.9.1