admin
2019-09-22 b9f8ef2c4737b6e6be4b12fc8f7bafb033bfcfe5
fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java
@@ -9,7 +9,6 @@
import javax.annotation.Resource;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -18,11 +17,11 @@
import com.yeshi.fanli.entity.bus.user.LostOrder;
import com.yeshi.fanli.entity.bus.user.Order;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.msg.UserOrderMsgNotificationService;
import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
import com.yeshi.fanli.service.inter.order.LostOrderService;
import com.yeshi.fanli.service.inter.order.OrderService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
import com.yeshi.fanli.service.inter.order.tb.TaoBaoPunishOrderService;
import com.yeshi.fanli.util.Utils;
@Service
@@ -43,6 +42,9 @@
   @Resource
   private UserOrderMsgNotificationService userOrderMsgNotificationService;
   @Resource
   private TaoBaoPunishOrderService taoBaoPunishOrderService;
   @Transactional
   @Override
   public int addLostOrder(LostOrder lostOrder) {
@@ -51,6 +53,14 @@
      if (type == null) { // 默认为淘宝订单
         lostOrder.setType(1);
         type = 1;
      }
      // 是否处于违规订单中
      if (type == 1) {
         int count = taoBaoPunishOrderService.countByTradeParentId(orderId);
         if (count > 0) {
            return -1001;
         }
      }
      // 订单是否已申诉
@@ -73,7 +83,7 @@
      }
      // 是否为分享赚订单
      if (hongBaoOrderService.countByOrderNoAndHongBaoType(orderId, HongBaoV2.TYPE_SHARE_GOODS) > 0)
      if (hongBaoOrderService.countByOrderNoAndHongBaoType(orderId, HongBaoV2.TYPE_SHARE_GOODS, type) > 0)
         return -5;
      // 次数限制
@@ -106,7 +116,7 @@
            lostOrderwriteLock.unlock();
         }
         Order or = orderService.getSystemOrderByUid(Constant.TAOBAO, lostOrder.getUserInfo().getId());
         Order or = orderService.getSystemOrderByUid(type, lostOrder.getUserInfo().getId());
         if (or != null) {
            boolean b = Utils.isUserOrder(or.getOrderId(), lostOrder.getOrderId());
            if (b) {
@@ -293,7 +303,8 @@
    * @return
    */
   @Override
   public List<LostOrder> listQuery(long start, int count, String key, Integer state, Integer handleType, Integer type) {
   public List<LostOrder> listQuery(long start, int count, String key, Integer state, Integer handleType,
         Integer type) {
      return lostOrderMapper.listQuery(start, count, key, state, handleType, type);
   }