yujian
2019-01-22 88b54772dbcf5ecab1e2316e4e4626ac901b8908
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java
@@ -11,9 +11,9 @@
import org.springframework.transaction.annotation.Transactional;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
import com.yeshi.fanli.entity.admin.ReslutOrder;
import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
import com.yeshi.fanli.service.inter.taobao.TaoBaoOrderService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
@@ -35,11 +35,13 @@
      Iterator<String> its = map.keySet().iterator();
      while (its.hasNext()) {
         String orderId = its.next();
         String key = "doorder-" + orderId;
         String key = "addorder-" + orderId;
         // redis做频率限制
         try {
            if (!StringUtil.isNullOrEmpty(redisManager.getCommonString(key))) {
               continue;
            if (Constant.IS_OUTNET) {
               if (!StringUtil.isNullOrEmpty(redisManager.getCommonString(key))) {
                  continue;
               }
            }
         } catch (Exception e) {
@@ -48,7 +50,8 @@
         addTaoBaoOrder(orderId, map.get(orderId));
         try {
            // 6小时内不再处理
            redisManager.cacheCommonString(key, "1", 60 * 60 * 6);
            if (Constant.IS_OUTNET)
               redisManager.cacheCommonString(key, "1", 60 * 60 * 6);
         } catch (Exception e) {
         }
@@ -88,26 +91,10 @@
      return taoBaoOrderMapper.selectTaoBaoOrderByOrderId(orderId);
   }
   @Override
   public List<ReslutOrder> queryJoinHongBao(int start, int count, String key, String startTime, String endTime,
         Integer type, Integer days) throws Exception {
      return taoBaoOrderMapper.queryJoinHongBao(start, count, key, startTime, endTime, type, days);
   }
   @Override
   public int countQueryJoinHongBao(String key, String startTime, String endTime, Integer type, Integer days)
         throws Exception {
      return taoBaoOrderMapper.countQueryJoinHongBao(key, startTime, endTime, type, days);
   }
   @Override
   public double countEstimate(String date) throws Exception {
      return taoBaoOrderMapper.countEstimate(date);
   }
   @Override
   public List<TaoBaoOrder> getStateByOrderIdAndPayment(String orderId, String payment) throws Exception {
      return taoBaoOrderMapper.getStateByOrderIdAndPayment(orderId, payment);
   }
}