| | |
| | | import com.yeshi.fanli.dto.mq.user.body.UserForbiddenMQMsg;
|
| | | import com.yeshi.fanli.dto.order.UserTeamLevel;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.TeamUserLevelStatistic;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.exception.ParamsException;
|
| | | import com.yeshi.fanli.exception.money.TeamDividentsDebtException;
|
| | |
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.vip.TeamUserLevelStatisticService;
|
| | | import com.yeshi.fanli.service.manger.order.TeamDividentsManager;
|
| | | import com.yeshi.fanli.service.manger.order.TeamDividentsSourceManager;
|
| | | import com.yeshi.fanli.service.manger.user.UserLevelManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.order.CommonOrderUtil;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | |
| | | private ThreeSaleSerivce threeSaleSerivce;
|
| | |
|
| | | @Resource
|
| | | private TeamUserLevelStatisticService teamUserLevelStatisticService;
|
| | | private UserLevelManager userLevelManager;
|
| | |
|
| | | public OrderDividentsMessageListener() {
|
| | |
|
| | |
| | | List<ThreeSale> threeSalesList = threeSaleSerivce.getMyBossDeepList(dto.getUid(), 100);
|
| | | if (threeSalesList != null)
|
| | | for (ThreeSale ts : threeSalesList) {
|
| | | TeamUserLevelStatistic levelStatistic = teamUserLevelStatisticService
|
| | | .selectByUid(ts.getBoss().getId());
|
| | | if (levelStatistic == null) {
|
| | | teamUserLevelStatisticService.initData(ts.getBoss().getId());
|
| | | levelStatistic = teamUserLevelStatisticService.selectByUid(ts.getBoss().getId());
|
| | | }
|
| | | bossList.add(new UserTeamLevel(ts.getBoss().getId(), levelStatistic.getLevel()));
|
| | | UserLevelEnum level = userLevelManager.getUserLevel(ts.getBoss().getId());
|
| | | bossList.add(new UserTeamLevel(ts.getBoss().getId(), level));
|
| | | }
|
| | | try {
|
| | | teamDividentsSourceManager.addSource(commonOrderList, bossList);
|