| | |
| | | package com.yeshi.fanli.service.manger.order;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
| | | if (commonOrderList.get(0).getThirdCreateTime().getTime() < Constant.NEW_ORDER_FANLI_RULE_TIME)
|
| | | return;
|
| | |
|
| | | Date placeOrderTime = commonOrderList.get(0).getThirdCreateTime();
|
| | |
|
| | | UserLevelEnum level = UserLevelUtil.getByOrderRank(commonOrderList.get(0).getUrank());
|
| | | if (level == null)
|
| | | level = UserLevelEnum.daRen;
|
| | |
| | | return;
|
| | |
|
| | | // 计算团队分红比例
|
| | | List<UserTeamRate> rateList = orderHongBaoMoneyComputeService.getTeamDividentsRates(level, bossList);
|
| | | List<UserTeamRate> rateList = orderHongBaoMoneyComputeService.getTeamDividentsRates(level, bossList,
|
| | | placeOrderTime);
|
| | | if (rateList != null)
|
| | | for (UserTeamRate rate : rateList) {
|
| | | BigDecimal money = MoneyBigDecimalUtil.div(rate.getRate().multiply(order.getMoney()),
|
| | |
| | | }
|
| | | }
|
| | | // 计算二级外分红比例
|
| | | rateList = orderHongBaoMoneyComputeService.getTeamRewardMoreThan2LevelRates(level, bossList);
|
| | | rateList = orderHongBaoMoneyComputeService.getTeamRewardMoreThan2LevelRates(level, bossList, placeOrderTime);
|
| | | if (rateList != null)
|
| | | for (UserTeamRate rate : rateList) {
|
| | | BigDecimal money = MoneyBigDecimalUtil.div(rate.getRate().multiply(order.getMoney()),
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void invalidBySourceUid(Long sourceUid, String beiZhu) {
|
| | | // teamDividentsSourceOrderService.invalidOrderByUid(sourceUid, beiZhu);
|
| | | teamDividentsSourceOrderUserMapService.invalidOrderBySourceUid(sourceUid, beiZhu);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 订单结算
|
| | | * @Title: orderSettle
|