| | |
| | | import com.yeshi.fanli.dao.mybatis.order.HongBaoOrderMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.order.OrderMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper;
|
| | | import com.yeshi.fanli.dto.mq.UidDateDTO;
|
| | | import com.yeshi.fanli.dto.mq.order.OrderTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.order.body.OrderMQMsg;
|
| | | import com.yeshi.fanli.dto.mq.order.body.OrderMoneyRecievedMQMsg;
|
| | | import com.yeshi.fanli.dto.order.CommonOrderAddResultDTO;
|
| | | import com.yeshi.fanli.dto.order.HongBaoAddResult;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.LostOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderMoneySettleService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderProcessService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderTeamRewardService;
|
| | | import com.yeshi.fanli.service.inter.order.jd.JDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.order.pdd.PDDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoBuyRelationMapService;
|
| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.cmq.PlaceOrderCMQManager;
|
| | | import com.yeshi.fanli.util.cmq.order.PlaceOrderCMQManager;
|
| | | import com.yeshi.fanli.util.cmq.order.TeamOrderCMQManager;
|
| | | import com.yeshi.fanli.util.factory.UserMoneyDetailFactory;
|
| | | import com.yeshi.fanli.util.jd.JDApiUtil;
|
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil;
|
| | |
| | | private UserMoneyMsgNotificationService userMoneyMsgNotificationService;
|
| | |
|
| | | @Resource
|
| | | private UserOrderMsgNotificationService userOrderMsgNotificationService;
|
| | |
|
| | | @Resource
|
| | | private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
|
| | |
|
| | | @Resource
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoV2AddManager hongBaoV2AddManager;
|
| | |
|
| | | @Resource
|
| | | private OrderTeamRewardService orderTeamRewardService;
|
| | |
|
| | | /**
|
| | | * 是否是分享订单
|
| | |
| | | List<TaoBaoOrder> list = orders.get(orderId);
|
| | | String pid = String.format("mm_%s_%s_%s", configList.get(0).getAccountId(),
|
| | | list.get(0).getSourceMediaId(), list.get(0).getAdPositionId());
|
| | | if ("饿了么".equalsIgnoreCase(list.get(0).getOrderType())) {
|
| | | // 处理饿了么订单
|
| | | elmeOrderMap.put(orderId, list);
|
| | | }
|
| | |
|
| | | else {
|
| | | if ("饿了么".equalsIgnoreCase(list.get(0).getOrderType())
|
| | | && !pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_RELATION_PID_DEFAULT)) {
|
| | | // 饿了么订单开始归入到淘宝订单
|
| | | if (TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(),
|
| | | "yyyy-MM-dd HH:mm:ss") >= Constant.NEW_ORDER_FANLI_RULE_TIME) {
|
| | | fanliOrderMap.put(orderId, list);
|
| | | } else {
|
| | | elmeOrderMap.put(orderId, list);
|
| | | }
|
| | | } else if ("口碑".equalsIgnoreCase(list.get(0).getOrderType())
|
| | | && pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_KOUBEI_PID)) {// 口碑自购
|
| | | fanliOrderMap.put(orderId, list);
|
| | | } else {
|
| | | if (!StringUtil.isNullOrEmpty(list.get(0).getSpecialId())
|
| | | || pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID)) {// 设置渠道ID当做会员运营ID的位置ID
|
| | | fanliOrderMap.put(orderId, list);
|
| | |
| | | || hb.getPreGetTime().getTime() > System.currentTimeMillis())
|
| | | continue;
|
| | | try {
|
| | | CMQManager.getInstance().addFanLiMsgNew(hb);
|
| | | if (Constant.ENABLE_MQ)
|
| | | CMQManager.getInstance().addFanLiMsgNew(hb);
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | public void fanli(HongBaoV2 hb1) throws TaoBaoWeiQuanException {
|
| | | // 查询最新的红包数据
|
| | | hb1 = hongBaoV2Mapper.selectByPrimaryKeyForUpdate(hb1.getId());
|
| | |
|
| | | if (hb1 == null || hb1.getState() != HongBaoV2.STATE_KELINGQU || hb1.getPreGetTime() == null
|
| | | || hb1.getPreGetTime().getTime() > System.currentTimeMillis())
|
| | | return;
|
| | |
|
| | | // 正常用户才能到账
|
| | | UserInfo mainUser = userInfoMapper.selectAvailableByPrimaryKey(hb1.getUserInfo().getId());
|
| | | if (mainUser == null || mainUser.getState() != UserInfo.STATE_NORMAL) {
|
| | |
| | | for (TaoBaoWeiQuanOrder order : orderList) {
|
| | | try {
|
| | | if (order.getState().contains("维权成功")) {
|
| | | CMQManager.getInstance().addWeiQuanOrderMsg(order);
|
| | | if (Constant.ENABLE_MQ)
|
| | | CMQManager.getInstance().addWeiQuanOrderMsg(order);
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.error("维权订单加入到队列出错:" + order != null ? new Gson().toJson(order) : null);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliInvaiteAndShare() {
|
| | | // 查出邀请赚与分享赚该返利的用户ID
|
| | | List<Long> inviteAndShareUids = hongBaoV2Mapper.listUidCanBanlanceShareAndInvite(1000);
|
| | | public void fanliPreInvaite(Date maxTime) {
|
| | | // 查出邀请赚的用户ID
|
| | | List<Integer> typeList = new ArrayList<>();
|
| | | typeList.add(HongBaoV2.TYPE_YIJI);
|
| | | typeList.add(HongBaoV2.TYPE_ERJI);
|
| | | typeList.add(HongBaoV2.TYPE_SHARE_YIJI);
|
| | | typeList.add(HongBaoV2.TYPE_SHARE_ERJI);
|
| | |
|
| | | long count = hongBaoV2Mapper.countUidCanBanlanceByTypeAndMaxTime(typeList, maxTime);
|
| | | int pageSize = 1000;
|
| | | int page = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | Set<Long> uidSets = new HashSet<>();
|
| | | if (inviteAndShareUids != null)
|
| | | for (Long uid : inviteAndShareUids) {
|
| | | if (userInfoMapper.selectAvailableByPrimaryKey(uid) != null)
|
| | | uidSets.add(uid);
|
| | | }
|
| | | for (int i = 0; i < page; i++) {
|
| | | List<Long> inviteAndShareUids = hongBaoV2Mapper.listUidCanBanlanceByTypeAndMaxTime(typeList, maxTime,
|
| | | i * pageSize, pageSize);
|
| | | if (inviteAndShareUids != null)
|
| | | for (Long uid : inviteAndShareUids) {
|
| | | if (userInfoMapper.selectAvailableByPrimaryKey(uid) != null)
|
| | | uidSets.add(uid);
|
| | | }
|
| | | }
|
| | | // 根据用户ID
|
| | | Iterator<Long> its = uidSets.iterator();
|
| | | while (its.hasNext()) {
|
| | | Long uid = its.next();
|
| | | try {
|
| | | CMQManager.getInstance().addFanLiTiChengMsg(uid);
|
| | | if (Constant.ENABLE_MQ)
|
| | | TeamOrderCMQManager.getInstance().addFanLiTeamIncomePreMsg(new UidDateDTO(uid, maxTime));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | LogHelper.error(e);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliShare(Date maxTime) {
|
| | | // 查出邀请赚的用户ID
|
| | | List<Integer> typeList = new ArrayList<>();
|
| | | typeList.add(HongBaoV2.TYPE_SHARE_GOODS);
|
| | |
|
| | | long count = hongBaoV2Mapper.countUidCanBanlanceByTypeAndMaxTime(typeList, maxTime);
|
| | | int pageSize = 1000;
|
| | | int page = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | Set<Long> uidSets = new HashSet<>();
|
| | | for (int i = 0; i < page; i++) {
|
| | | List<Long> inviteAndShareUids = hongBaoV2Mapper.listUidCanBanlanceByTypeAndMaxTime(typeList, maxTime,
|
| | | i * pageSize, pageSize);
|
| | | if (inviteAndShareUids != null)
|
| | | for (Long uid : inviteAndShareUids) {
|
| | | if (userInfoMapper.selectAvailableByPrimaryKey(uid) != null)
|
| | | uidSets.add(uid);
|
| | | }
|
| | | }
|
| | | // 根据用户ID
|
| | | Iterator<Long> its = uidSets.iterator();
|
| | | while (its.hasNext()) {
|
| | | Long uid = its.next();
|
| | | try {
|
| | | if (Constant.ENABLE_MQ)
|
| | | CMQManager.getInstance().addFanLiShareMsg(new UidDateDTO(uid, maxTime));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | LogHelper.error(e);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void fanliInvaiteAndShare(Long uid) throws TaoBaoWeiQuanException {
|
| | | public void fanliPreInvaite(Long uid, Date maxPreGetTime) {
|
| | | // 邀请赚到账
|
| | | try {
|
| | | orderMoneySettleService.inviteSettleTB(uid);
|
| | | orderMoneySettleService.inviteSettleTB(uid, maxPreGetTime);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | orderMoneySettleService.inviteSettleJD(uid);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | //
|
| | | try {
|
| | | orderMoneySettleService.inviteSettlePDD(uid);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 分享赚到账
|
| | | try {
|
| | | orderMoneySettleService.shareSettleTB(uid);
|
| | | orderMoneySettleService.inviteSettleJD(uid, maxPreGetTime);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | orderMoneySettleService.shareSettleJD(uid);
|
| | | orderMoneySettleService.inviteSettlePDD(uid, maxPreGetTime);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | //
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void fanliShare(Long uid, Date maxPreGetTime) {
|
| | | // 邀请赚到账
|
| | | try {
|
| | | orderMoneySettleService.shareSettlePDD(uid);
|
| | | orderMoneySettleService.shareSettleTB(uid, maxPreGetTime);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | orderMoneySettleService.shareSettleJD(uid, maxPreGetTime);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | orderMoneySettleService.shareSettlePDD(uid, maxPreGetTime);
|
| | | } catch (OrderMoneySettleException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | if (oldOrder == null) {
|
| | | Long targetUid = null;
|
| | | if (pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID)
|
| | | && !StringUtil.isNullOrEmpty(orderList.get(0).getRelationId())) {
|
| | | && !StringUtil.isNullOrEmpty(orderList.get(0).getRelationId())) {// 处理非返利商品库的商品
|
| | | targetUid = taoBaoBuyRelationMapService.selectUidByRelationId(orderList.get(0).getRelationId());
|
| | |
|
| | | } else if ((pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_ELEME_PID)
|
| | | || pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_KOUBEI_PID))
|
| | | && !StringUtil.isNullOrEmpty(orderList.get(0).getRelationId())) {// 处理饿了么,口碑的订单
|
| | | UserExtraTaoBaoInfo extraInfo = userExtraTaoBaoInfoService
|
| | | .getByRelationId(orderList.get(0).getRelationId());
|
| | | if (extraInfo != null) {
|
| | | targetUid = extraInfo.getUser().getId();
|
| | | }
|
| | | } else if (!StringUtil.isNullOrEmpty(orderList.get(0).getSpecialId())) {
|
| | | UserExtraTaoBaoInfo info = userExtraTaoBaoInfoService
|
| | | .getBySpecialId(orderList.get(0).getSpecialId());
|
| | |
| | | order.setOrderType(Constant.SOURCE_TYPE_TAOBAO);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | if (!Constant.IS_TEST)
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
| | | order.setOrderType(Constant.SOURCE_TYPE_TAOBAO);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | |
| | | order.setOrderType(Constant.SOURCE_TYPE_JD);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | |
| | | order.setOrderType(Constant.SOURCE_TYPE_JD);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | |
| | | order.setOrderType(Constant.SOURCE_TYPE_PDD);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | |
| | | order.setOrderType(Constant.SOURCE_TYPE_PDD);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | |
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void invalidHongBaoV2AndGiveGodenCorn(Long hongBaoId, Long uid, String orderId, int sourceType,
|
| | | String beiZhu) throws Exception {
|
| | | HongBaoOrder hongbaoOrder = hongBaoOrderMapper.selectByHongBaoId(hongBaoId);
|
| | | if (hongbaoOrder != null) {
|
| | | CommonOrder commonOrder = commonOrderService.selectByPrimaryKey(hongbaoOrder.getCommonOrder().getId());
|
| | | if (commonOrder != null) {
|
| | | if (commonOrder.getState() == CommonOrder.STATE_FK) {
|
| | | CommonOrder updateOrder = new CommonOrder(commonOrder.getId());
|
| | | updateOrder.setState(CommonOrder.STATE_SX);
|
| | | updateOrder.setUpdateTime(new Date());
|
| | | commonOrderService.updateByPrimaryKeySelective(updateOrder);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | HongBaoV2 hongBao = hongBaoV2Service.selectByPrimaryKey(hongBaoId);
|
| | | if (hongBao == null || hongBao.getState() == HongBaoV2.STATE_SHIXIAO)
|
| | | return;
|
| | |
|
| | | HongBaoV2 v2 = new HongBaoV2(hongBaoId);
|
| | | v2.setState(HongBaoV2.STATE_SHIXIAO);
|
| | | v2.setBeizhu(beiZhu);
|
| | |
| | | update.setUpdateTime(new Date());
|
| | | hongBaoV2Service.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | userSystemCouponService.systemGiveRewardCoupon(uid, 1, orderId, sourceType, "因商家违约未能结算返利或商家已经关店");
|
| | |
|
| | | if (hongBao.getType() == HongBaoV2.TYPE_ZIGOU || hongBao.getType() == HongBaoV2.TYPE_SHARE_GOODS) {
|
| | | userOrderMsgNotificationService.orderInvalidToBusinessRunning(uid, orderId, sourceType, hongBao.getType());
|
| | | }
|
| | | }
|
| | |
|
| | | @Transactional
|
| | |
| | | // 查询主红包
|
| | | HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByCommonOrderId(commonOrder.getId());
|
| | | if (hongBaoOrder != null && hongBaoOrder.getHongBaoV2() != null) {
|
| | | if (hongBaoOrder.getHongBaoV2().getState() == HongBaoV2.STATE_BUKELINGQU) {
|
| | | if (hongBaoOrder.getHongBaoV2().getState() == HongBaoV2.STATE_BUKELINGQU || hongBaoOrder.getHongBaoV2().getState() == HongBaoV2.STATE_SHIXIAO) {
|
| | | // 订单失效,赠送金币
|
| | | try {
|
| | | invalidHongBaoV2AndGiveGodenCorn(hongBaoOrder.getHongBaoV2().getId(), hongBaoOrder.getHongBaoV2().getUserInfo().getId(), commonOrder.getOrderNo(), commonOrder.getSourceType(), "订单成功,商家未打款");
|
| | |
| | | public List<HongBaoV2> getCanBalanceElmeFanliHongBao() {
|
| | | List<Integer> list = new ArrayList<>();
|
| | | list.add(HongBaoV2.TYPE_ELME);
|
| | | return hongBaoV2Mapper.listCanBalanceHongBaoByTypeAndUid(list, null, null, 0, 1000);
|
| | | return hongBaoV2Mapper.listCanBalanceHongBaoByTypeAndUid(list, null, null, new Date(), 0, 1000);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | }
|
| | | userMoneyService.addUserMoney(hongBao.getUserInfo().getId(), hongBao.getMoney(), detail);
|
| | | BigDecimal balance = userInfoMapper.selectByPrimaryKey(hongBao.getUserInfo().getId()).getMyHongBao();
|
| | | // 添加消息
|
| | | userMoneyMsgNotificationService.elmeFanli(hongBao.getUserInfo().getId(), order.getOrderId(),
|
| | | hongBao.getMoney(), balance);
|
| | | }
|
| | | // 返利到账
|
| | | }
|
| | |
| | | private void addHongBaoWithMQ(List<CommonOrderAddResultDTO> commonOrderList, String orderId, Long uid,
|
| | | int sourceType, int hongBaoType) {
|
| | | final List<CommonOrder> coList = convertCommonOrder(commonOrderList);
|
| | | int resultCode = 0;
|
| | | HongBaoAddResult result = null;
|
| | | try {
|
| | | long time = TimeUtil.convertToTimeTemp("2019-12-06", "yyyy-MM-dd");
|
| | | if (!Constant.IS_TEST)
|
| | | time = TimeUtil.convertToTimeTemp("2019-12-20", "yyyy-MM-dd");
|
| | |
|
| | | if (coList.get(0).getThirdCreateTime().getTime() < time)
|
| | | resultCode = hongBaoV2Service.addHongBao(coList, hongBaoType);
|
| | | result = hongBaoV2Service.addHongBao(coList, hongBaoType);
|
| | | else
|
| | | resultCode = hongBaoV2AddManager.addHongBao(coList, hongBaoType);
|
| | | result = hongBaoV2AddManager.addHongBao(coList, hongBaoType);
|
| | | } catch (HongBaoException e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e, "addJDOrder或addHongBao出错", "订单号:" + orderId);
|
| | |
| | |
|
| | | }
|
| | | if (!Constant.IS_TEST)
|
| | | if (resultCode == 1) {// 只发送新增消息
|
| | | if (result.getResultCode() == HongBaoAddResult.CODE_ADD) {// 只发送新增消息
|
| | | OrderMQMsg mqMsg = new OrderMQMsg(orderId, sourceType, uid, OrderMQMsg.HANDLE_TYPE_ADD,
|
| | | isCommonOrderValid(coList), 0, new Date());
|
| | | isCommonOrderValid(coList), 0, new Date(), result.isMiandan());
|
| | | Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.orderStatistic, mqMsg);
|
| | | producer.send(msg);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliOrderTeamReward() {
|
| | | Date time = new Date();
|
| | | long count = orderTeamRewardService.countCanSettleUid(time);
|
| | | int pageSize = 500;
|
| | | int page = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | List<Long> uidList = new ArrayList<>();
|
| | | for (int i = 0; i < page; i++) {
|
| | | List<Long> list = orderTeamRewardService.listCanSettleUid(time, i + 1, pageSize);
|
| | | if (list != null && list.size() > 0)
|
| | | uidList.addAll(list);
|
| | | }
|
| | | // 添加到队列
|
| | | if (uidList != null)
|
| | | for (Long uid : uidList)
|
| | | if (!Constant.IS_TEST)
|
| | | CMQManager.getInstance().addFanLiOrderTeamRewardMsg(uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliOrderTeamReward(Long uid) throws OrderMoneySettleException {
|
| | | orderMoneySettleService.orderTeamRewardSettle(uid);
|
| | | }
|
| | |
|
| | | }
|