yujian
2019-09-10 65460a2dc7c69d8c0e031ec4c89e25d47e5173f2
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoWeiQuanOrderServiceImpl.java
@@ -37,8 +37,8 @@
            .selectByOrderIdAndOrderItemId(order.getOrderId(), order.getOrderItemId());
      if (taoBaoWeiQuanOrder != null) {
         // 已经是最新的状态了
         if (taoBaoWeiQuanOrder.getState().equalsIgnoreCase("维权成功")
               || taoBaoWeiQuanOrder.getState().equalsIgnoreCase("维权失败"))
         if (taoBaoWeiQuanOrder.getState() != null && (taoBaoWeiQuanOrder.getState().contains("维权成功")
               || taoBaoWeiQuanOrder.getState().contains("维权失败")))
            return;
         // 更新金额,状态与时间
         TaoBaoWeiQuanOrder update = new TaoBaoWeiQuanOrder();
@@ -52,18 +52,18 @@
         taoBaoWeiQuanOrderMapper.updateByPrimaryKeySelective(update);
         try {
            if (order.getState().equalsIgnoreCase("维权成功")) {
            if (order.getState().contains("维权成功")) {
               List<MsgOrderDetail> msgList = msgOrderDetailService.listMsgOrderByOrderId(order.getOrderId());
               for (MsgOrderDetail msg : msgList) {
                  if (msg.getType() == MsgTypeOrderTypeEnum.fanli) {
                     userOrderMsgNotificationService.orderFanLiStateChanged(msg.getUser().getId(),
                           order.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
                           order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
                  } else if (msg.getType() == MsgTypeOrderTypeEnum.invite) {
                     userOrderMsgNotificationService.orderInviteStateChanged(msg.getUser().getId(),
                           order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO,null, null, CommonOrder.STATE_WQ);
                           order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
                  } else if (msg.getType() == MsgTypeOrderTypeEnum.share) {
                     userOrderMsgNotificationService.orderShareStateChanged(msg.getUser().getId(),
                           order.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
                           order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
                  }
               }
            }
@@ -87,4 +87,24 @@
      return taoBaoWeiQuanOrderMapper.selectByOrderItemId(tradeId);
   }
   @Override
   public List<TaoBaoWeiQuanOrder> listByState(String state, int page, int pageSize) {
      return taoBaoWeiQuanOrderMapper.listByState(state, (page - 1) * pageSize, pageSize);
   }
   @Override
   public long countByState(String state) {
      return taoBaoWeiQuanOrderMapper.countByState(state);
   }
   @Override
   public List<TaoBaoWeiQuanOrder> listByOrderId(String orderId) {
      return taoBaoWeiQuanOrderMapper.listByOrderId(orderId);
   }
   @Override
   public TaoBaoWeiQuanOrder selectByTradeId(String tradeId) {
      return taoBaoWeiQuanOrderMapper.selectByOrderItem(tradeId);
   }
}