| | |
| | | } catch (ElmeHongBaoOrderMapException e) {
|
| | | throw new ElmeOrderException(e.getCode(), e.getMsg());
|
| | | }
|
| | | // 发送消息
|
| | | userOrderMsgNotificationService.orderElmeStatistic(user.getId(), elmeOrder.getOrderId(),
|
| | | Constant.SOURCE_TYPE_ELME, elmeOrder.getPayMoney(), hongBao.getMoney(), hongBao.getState());
|
| | | |
| | | } else {// 订单存在
|
| | | HongBaoV2 oldHongBao = hongBaoV2Service.selectByPrimaryKey(map.getHongBao().getId());
|
| | | if (oldHongBao == null)
|
| | |
| | | update.setPreGetTime(hongBao.getPreGetTime());
|
| | | update.setUpdateTime(new Date());
|
| | | hongBaoV2Service.updateByPrimaryKeySelective(update);
|
| | | // 发送消息
|
| | | userOrderMsgNotificationService.orderElmeStateChanged(oldHongBao.getUserInfo().getId(),
|
| | | elmeOrder.getOrderId(), Constant.SOURCE_TYPE_ELME, elmeOrder.getPayMoney(), hongBao.getMoney(),
|
| | | hongBao.getState());
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | | |
| | | case HongBaoV2.TYPE_SHARE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | // 添加新版本通知
|
| | |
|
| | | if (!hasAdd) {
|
| | | Iterator<Integer> its = notificationMap.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | Integer t = its.next();
|
| | | HongBaoV2 notify = notificationMap.get(t).getHongBaoV2();
|
| | | CommonOrder commonOrder = notificationMap.get(t).getCommonOrder();
|
| | | String orderId = commonOrderList.get(0).getOrderNo();
|
| | | Long uid = notify.getUserInfo().getId();
|
| | | BigDecimal money = notify.getMoney();
|
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | | userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | update.setResultCode(LostOrder.RESULT_CODE_FAIL);
|
| | | lostOrderMapper.updateByPrimaryKeySelective(update);
|
| | | // 添加通知
|
| | | userOrderMsgNotificationService.orderFoundFail(order.getUserInfo().getId(), order.getOrderId(), null, 1,
|
| | | new Date(order.getHandleTime()));
|
| | | userOrderMsgNotificationService.orderFoundFail(order.getUserInfo().getId(), order.getOrderId());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | update.setResultCode(LostOrder.RESULT_CODE_FAIL);
|
| | | lostOrderMapper.updateByPrimaryKeySelective(update);
|
| | | // 添加通知
|
| | | userOrderMsgNotificationService.orderFoundFail(order.getUserInfo().getId(), order.getOrderId(), null, 1,
|
| | | new Date(order.getHandleTime()));
|
| | | userOrderMsgNotificationService.orderFoundFail(order.getUserInfo().getId(), order.getOrderId());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | case HongBaoV2.TYPE_SHARE_ERJI:
|
| | | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | |
|
| | | // 添加新版本通知
|
| | |
|
| | | if (!hasAdd) {
|
| | | Iterator<Integer> its = notificationMap.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | Integer t = its.next();
|
| | | HongBaoV2 notify = notificationMap.get(t).getHongBaoV2();
|
| | | CommonOrder commonOrder = notificationMap.get(t).getCommonOrder();
|
| | | String orderId = commonOrderList.get(0).getOrderNo();
|
| | | Long uid = notify.getUserInfo().getId();
|
| | | BigDecimal money = notify.getMoney();
|
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | | userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break; |
| | | |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | case HongBaoV2.TYPE_SHARE_ERJI:
|
| | | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | |
|
| | | // 添加新版本通知
|
| | |
|
| | | if (!hasAdd) {
|
| | | Iterator<Integer> its = notificationMap.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | Integer t = its.next();
|
| | | HongBaoV2 notify = notificationMap.get(t).getHongBaoV2();
|
| | | CommonOrder commonOrder = notificationMap.get(t).getCommonOrder();
|
| | | String orderId = commonOrderList.get(0).getOrderNo();
|
| | | Long uid = notify.getUserInfo().getId();
|
| | | BigDecimal money = notify.getMoney();
|
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | | userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | break; |
| | | }
|
| | | }
|
| | | }
|