| | |
| | | package cc.mrbird.febs.mall.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.enumerates.AgentLevelEnum; |
| | | import cc.mrbird.febs.common.enumerates.RunVipDataDictionaryEnum; |
| | | import cc.mrbird.febs.common.enumerates.YesOrNoEnum; |
| | | import cc.mrbird.febs.common.enumerates.*; |
| | | import cc.mrbird.febs.common.utils.MallUtils; |
| | | import cc.mrbird.febs.mall.dto.ApiMemberChargeFailDto; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.service.AsyncService; |
| | | import cc.mrbird.febs.mall.service.IAgentService; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberService; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; |
| | | import cc.mrbird.febs.mall.service.*; |
| | | import cc.mrbird.febs.rabbit.producter.AgentProducer; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | |
| | | private final RunNodeSetMapper runNodeSetMapper; |
| | | private final AsyncService asyncService; |
| | | private final RunVipGrowMapper runVipGrowMapper; |
| | | private final IMallMoneyFlowService mallMoneyFlowService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | MallMember graMember = mallMemberMapper.selectInfoByInviteId(parentMember.getReferrerId()); |
| | | NodeUp(graMember.getId(),directCnt,teamCnt,achieveCnt); |
| | | } |
| | | |
| | | @Override |
| | | public void chargeSuccessMsg(Long chargeId) { |
| | | |
| | | MallCharge mallCharge = mallChargeMapper.selectById(chargeId); |
| | | if(null == mallCharge){ |
| | | return; |
| | | } |
| | | Long memberId = mallCharge.getMemberId(); |
| | | BigDecimal amount = mallCharge.getAmount(); |
| | | |
| | | walletService.addCommission(amount, memberId); |
| | | String orderNo = MallUtils.getOrderNum("C"); |
| | | mallMoneyFlowService.runVipMoneyFlowAdd( |
| | | memberId, |
| | | memberId, |
| | | orderNo, |
| | | FlowTypeEnum.COMMISSION.getValue(), |
| | | RunVipMoneyFlowTypeEnum.COMMISSION_PAY_CHARGE.getValue(), |
| | | amount, |
| | | StrUtil.format(RunVipMoneyFlowTypeEnum.COMMISSION_PAY_CHARGE.getDescription(),amount), |
| | | YesOrNoEnum.YES.getValue() |
| | | ); |
| | | } |
| | | } |