From 32a2a79f797fb5932dc56188ac450adff93cde28 Mon Sep 17 00:00:00 2001 From: Hentua <wangdoubleone@gmail.com> Date: Mon, 08 May 2023 21:08:46 +0800 Subject: [PATCH] fix --- src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java | 17 +++++++++++------ src/main/resources/mapper/modules/MallMoneyFlowMapper.xml | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java index 9ac17f7..7f8115e 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java @@ -25,6 +25,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.SecureUtil; @@ -372,12 +373,16 @@ mallMoneyFlowService.addMoneyFlow(member.getId(), score, MoneyFlowTypeEnum.BUY_TC.getValue(), orderInfo.getOrderNo(), FlowTypeEnum.SCORE.getValue()); mallMoneyFlowService.addMoneyFlow(member.getId(), orderInfo.getAmount().subtract(orderInfo.getScoreAmount()).negate(), MoneyFlowTypeEnum.PAY.getValue(), orderInfo.getOrderNo(), FlowTypeEnum.BALANCE.getValue()); - //发送代理自动升级消息 - agentProducer.sendAutoLevelUpMsg(member.getId()); - //发送直推返利消息 - agentProducer.sendOrderReturn(orderInfo.getId()); - // 发送分红消息 - agentProducer.sendOrderBonus(orderInfo.getId()); + ThreadUtil.execute(() -> { + ThreadUtil.sleep(5000); + + //发送代理自动升级消息 + agentProducer.sendAutoLevelUpMsg(member.getId()); + //发送直推返利消息 + agentProducer.sendOrderReturn(orderInfo.getId()); + // 发送分红消息 + agentProducer.sendOrderBonus(orderInfo.getId()); + }); break; case "4": if (orderInfo.getOrderType() != 2) { diff --git a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml index 9496864..2efcdaa 100644 --- a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml +++ b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml @@ -123,7 +123,7 @@ <select id="selectCommissionIncome" resultType="java.math.BigDecimal"> select ifnull(sum(amount),0) from mall_money_flow - where flow_type = 1 and type in (1,2,3,4,5,7,16,17) and member_id=#{memberId} and amount > 0 + where flow_type = 1 and type in (1,2,3,4,5,7,17) and member_id=#{memberId} and amount > 0 <if test="type == 1"> and date_format(created_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d') </if> -- Gitblit v1.9.1