| | |
| | | import com.yeshi.fanli.dao.mybatis.order.OrderRepairHistoryMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.money.ExtractCheckCompensate;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | |
| | | @Resource
|
| | | private ExtractCheckCompensateMapper extractCheckCompensateMapper;
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void repairOrder(String orderId) throws Exception {
|
| | | // 比较CommonOrder与TaoBaoOrder的预估收益
|
| | |
| | | }
|
| | |
|
| | | // 修改订单信息
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void updateOrderInfo(TaoBaoOrder taoBaoOrder, Long commonOrderId) throws Exception {
|
| | | HongBaoOrder hongBaoOrder = hongBaoOrderService.selectDetailByCommonOrderId(commonOrderId);
|
| | | CommonOrder newCommonOrder = CommonOrderFactory.create(taoBaoOrder);
|
| | | CommonOrder newCommonOrder = CommonOrderFactory.create(taoBaoOrder);
|
| | | List<CommonOrderGoods> commonGoodsList = commonOrderGoodsMapper
|
| | | .listByGoodsIdAndGoodsType(taoBaoOrder.getAuctionId() + "", newCommonOrder.getSourceType());
|
| | | CommonOrderGoods cog = null;
|
| | |
| | | CommonOrder commonOrder = commonOrderService.selectByPrimaryKey(newCommonOrder.getId());
|
| | |
|
| | | if (hongBaoOrder.getHongBaoV2().getType() == HongBaoV2.TYPE_ZIGOU) {
|
| | | BigDecimal fanliRate = hongBaoManageService.getFanLiRate(commonOrder.getCreateTime().getTime());
|
| | | BigDecimal fanliRate = hongBaoManageService.getFanLiRate(UserLevelEnum.daRen,
|
| | | commonOrder.getCreateTime().getTime());
|
| | | // 免单处理
|
| | | boolean mianDan = false;
|
| | | List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(Constant.SOURCE_TYPE_TAOBAO,
|
| | |
| | | if (commonOrder.getState() == CommonOrder.STATE_JS)
|
| | | payMent = commonOrder.getSettlement();
|
| | | if (payMent.compareTo(new BigDecimal(10)) < 0) {
|
| | | mianDan = userSystemCouponRecordService.isSuccessMianDan(commonOrder.getSourceType(),commonOrder.getOrderNo());
|
| | | mianDan = userSystemCouponRecordService.isSuccessMianDan(commonOrder.getSourceType(),
|
| | | commonOrder.getOrderNo());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | } else if (hongBaoOrder.getHongBaoV2().getType() == HongBaoV2.TYPE_SHARE_GOODS) {
|
| | |
|
| | | BigDecimal fanliRate = hongBaoManageService.getShareRate(commonOrder.getCreateTime().getTime());
|
| | | BigDecimal fanliRate = hongBaoManageService.getShareRate(UserLevelEnum.daRen,
|
| | | commonOrder.getCreateTime().getTime());
|
| | | List<ShareGoodsActivityOrder> list = shareGoodsActivityOrderService
|
| | | .listByOrderIdAndUid(commonOrder.getUserInfo().getId(), commonOrder.getOrderNo());
|
| | | if (list != null && list.size() > 0) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void addOrder(CommonOrder commonOrder, int type, Long firstUid, Long secondUid) throws Exception {
|
| | | // 增加commonOrder
|
| | | commonOrder.setCreateTime(commonOrder.getThirdCreateTime());
|
| | |
| | |
|
| | | // 添加红包
|
| | | if (type == HongBaoV2.TYPE_ZIGOU) {// 获取自购的返利比例
|
| | | BigDecimal fanliRate = hongBaoManageService.getFanLiRate(commonOrder.getCreateTime().getTime());
|
| | | BigDecimal fanliRate = hongBaoManageService.getFanLiRate(UserLevelEnum.daRen,
|
| | | commonOrder.getCreateTime().getTime());
|
| | | // 查询是否有免单计划
|
| | | BigDecimal mianDanMoney = null;
|
| | | if (commonOrder.getState() == CommonOrder.STATE_JS || commonOrder.getState() == CommonOrder.STATE_FK) {
|
| | |
| | | if (commonOrder.getState() == CommonOrder.STATE_SX || commonOrder.getState() == CommonOrder.STATE_WQ)
|
| | | return;
|
| | | // 分享赚
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate(commonOrder.getCreateTime().getTime());
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate(UserLevelEnum.daRen,
|
| | | commonOrder.getCreateTime().getTime());
|
| | |
|
| | | HongBaoV2 hongBao = new HongBaoV2();
|
| | | hongBao.setBeizhu("2019年7月批量修改");
|
| | |
| | | return orderInfoMap.get(orderId);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void repireFirstAndSecondLevel(String orderId) throws Exception {
|
| | | repireFirstShare(orderId);
|