| | |
| | | @Resource
|
| | | private TaoBaoOrderService taoBaoOrderService;
|
| | |
|
| | |
|
| | | @Resource
|
| | | private LostOrderService lostOrderService;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoBuyRelationMapService taoBaoBuyRelationMapService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private CommonOrderService commonOrderService;
|
| | |
|
| | |
| | | shareOrderMap.put(orderId, list);
|
| | | } else {
|
| | |
|
| | | PidUser pidUser = null;//pidUserMapper.selectByPid(pid);
|
| | | PidUser pidUser = null;// pidUserMapper.selectByPid(pid);
|
| | | if (pidUser != null && pidUser.getType() == PidUser.TYPE_SHARE_GOODS) {// 商品分享订单
|
| | | // List<PidOrder> pidOrderList = new ArrayList<>();
|
| | | // for (TaoBaoOrder order : list) {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Resource
|
| | | private HongBaoOrderMapper hongBaoOrderMapper;
|
| | |
| | |
|
| | | // 邀请赚到账
|
| | | if (invitemoney.compareTo(new BigDecimal(0)) > 0) {
|
| | | userInfoMapper.addHongBaoByUid(uid, invitemoney);
|
| | |
|
| | | // 添加新版详情记录
|
| | | try {
|
| | |
| | |
|
| | | UserMoneyDetail userMoneyDetail = UserMoneyDetailFactory.createInvite(uid, (int) validCount,
|
| | | (int) weiQuanCount, (int) invalidCount, invitemoney, new Date());
|
| | | userMoneyDetailMapper.insert(userMoneyDetail);
|
| | |
|
| | | // 增加资金
|
| | | userMoneyService.addUserMoney(uid, invitemoney, userMoneyDetail);
|
| | | // 添加到红包返利记录集合
|
| | | accountDetailsHongBaoMapService.saveAccountDetailsHongBaoMap(hbIdList, userMoneyDetail.getId());
|
| | | } catch (UserMoneyDetailException e) {
|
| | |
| | | */
|
| | |
|
| | | if (sharemoney.compareTo(new BigDecimal(0)) > 0) {
|
| | | userInfoMapper.addHongBaoByUid(uid, sharemoney);
|
| | | // 添加新版详情记录
|
| | | try {
|
| | | // 计算本月的有效订单,失效订单,维权订单
|
| | |
| | |
|
| | | UserMoneyDetail userMoneyDetail = UserMoneyDetailFactory.createShare(uid, (int) validCount,
|
| | | (int) weiQuanCount, (int) invalidCount, sharemoney, new Date());
|
| | | userMoneyDetailMapper.insert(userMoneyDetail);
|
| | | // 添加资金
|
| | | userMoneyService.addUserMoney(uid, sharemoney, userMoneyDetail);
|
| | |
|
| | | // 添加到红包返利记录集合
|
| | | accountDetailsHongBaoMapService.saveAccountDetailsHongBaoMap(hbIdList, userMoneyDetail.getId());
|
| | | } catch (UserMoneyDetailException e) {
|
| | |
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void processShopingFanliOrderNew(String orderId, List<TaoBaoOrder> orderList)
|
| | |
| | | // 原来不存在订单
|
| | | Long uid = null;
|
| | | if (oldOrder == null) {
|
| | | PidUser pidUser =null;// pidUserMapper.selectByPid(pid);
|
| | | PidUser pidUser = null;// pidUserMapper.selectByPid(pid);
|
| | | if (pidUser != null) {
|
| | | uid = pidUser.getUid();
|
| | |
|
| | |
| | | try {
|
| | | commonOrderList = commonOrderService.addTaoBaoOrder(orderList, uid);
|
| | | hongBaoV2Service.addHongBao(commonOrderList, HongBaoV2.TYPE_ZIGOU);
|
| | | |
| | | |
| | |
|
| | | } catch (CommonOrderException e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e, "addTaoBaoOrder或addHongBao出错", "订单号:" + orderId);
|
| | |
| | | orderList.get(0).getSourceMediaId(), orderList.get(0).getAdPositionId());
|
| | | // 原来不存在订单
|
| | | Long uid = null;
|
| | | PidUser pidUser =null; //pidUserMapper.selectByPid(pid);-PID机制移除
|
| | | PidUser pidUser = null; // pidUserMapper.selectByPid(pid);-PID机制移除
|
| | | if (pidUser != null)
|
| | | uid = pidUser.getUid();
|
| | | else {
|