admin
2019-03-13 69bee82b81626b82b7f39f0e459e4f56b1699b51
fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java
@@ -14,9 +14,11 @@
import com.yeshi.fanli.dao.mybatis.order.LostOrderMapper;
import com.yeshi.fanli.dao.order.LostOrderDao;
import com.yeshi.fanli.dao.order.PidOrderDao;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
import com.yeshi.fanli.entity.bus.user.LostOrder;
import com.yeshi.fanli.entity.bus.user.Order;
import com.yeshi.fanli.service.inter.order.CommonOrderService;
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;
@@ -29,10 +31,10 @@
   private OrderService orderService;
   @Resource
   private LostOrderDao lostOrderDao;
   private HongBaoOrderService hongBaoOrderService;
   @Resource
   private PidOrderDao pidOrderDao;
   private LostOrderDao lostOrderDao;
   @Resource
   private LostOrderMapper lostOrderMapper;
@@ -65,7 +67,7 @@
      }
      // 查询是否为分享赚订单
      if (pidOrderDao.list("from PidOrder p where p.orderId=?", new Serializable[] { orderId }).size() > 0)
      if (hongBaoOrderService.countByOrderNoAndHongBaoType(orderId, HongBaoV2.TYPE_SHARE_GOODS) > 0)
         return -5;
      WriteLock lostOrderwriteLock = lostOrderLock.writeLock();
@@ -239,7 +241,7 @@
      // 订单申诉人工通过后,但是隔了3天还未处理成功就视为该订单申诉失败
      lostOrderDao.update(
            "update LostOrder lo set lo.resultCode=? where lo.state=1 and lo.resultCode=? and lo.handleTime<?",
            new Serializable[] { LostOrder.RESULT_CODE_FAIL, LostOrder.RESULT_CODE_FAIL,
            new Serializable[] { LostOrder.RESULT_CODE_FAIL, LostOrder.RESULT_CODE_VERFING,
                  System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 3L });
   }
@@ -277,4 +279,17 @@
   public long countQuery(String key, Integer state, Integer handleType) {
      return lostOrderMapper.countQuery(key, state, handleType);
   }
   @Override
   public List<Map<String, Object>> countLostNum(Integer dateType, Integer resultCode, String year, String startTime,
         String endTime) throws Exception {
      return lostOrderMapper.countLostNum(dateType, resultCode, year, startTime, endTime);
   }
   @Override
   public List<Map<String, Object>> countAppealMoney(Integer dateType, String year, String startTime, String endTime)
         throws Exception {
      return lostOrderMapper.countAppealMoney(dateType, year, startTime, endTime);
   }
}