| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | |
| | | <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> |