| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.config.push.PushMsgFactory;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | |
| | |
|
| | | @Override
|
| | | public void orderInviteStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, Date downTime) {
|
| | | // 是否通知
|
| | | boolean needNotify = (payMoney != null && payMoney.compareTo(new BigDecimal(0)) > 0) ? true : false;
|
| | | BigDecimal subsidy, int goodsCount, int orderState, Date downTime) {
|
| | | BigDecimal totalMoney = new BigDecimal(0);
|
| | | if (money != null) {
|
| | | totalMoney = totalMoney.add(money);
|
| | | } |
| | | if (subsidy != null) {
|
| | | totalMoney = totalMoney.add(subsidy); |
| | | }
|
| | | |
| | | if (totalMoney.compareTo(new BigDecimal(0)) <= 0) {
|
| | | return;
|
| | | }
|
| | | |
| | | // 保存消息明细消息
|
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_INVITE, goodsCount, payMoney, money, downTime, null, needNotify);
|
| | | |
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_INVITE, goodsCount, payMoney, totalMoney, downTime, null, true);
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createInviteOrderStatisticed(orderType, orderId, money);
|
| | | try {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void orderInvalidToBusinessRunning(Long uid, String orderId, int orderSource, int type) {
|
| | | try {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.orderInvalidToBusinessRunning(uid, orderId, orderSource, type);
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|