yujian
2019-11-11 3ce9e928e082ff8abf697dba560cbfbb412e89f8
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -275,11 +275,11 @@
      }
      boolean rewardOrder = false;
      int type = 1; // 1 常规跳转页面 2弹出选项(奖励券)
      if (rewardSuccess) {
         // 奖励成功
         rewardOrder = true;
         if (!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
            rewardOrder = true; //奖励成功 2.0.2 消失
         }
      } else if (hasRewardCoupon && !freeOrder && HongBaoV2.TYPE_ZIGOU == hongBaoType
            && HongBaoV2.STATE_YILINGQU == hongBaoState) {
         // 有可用的奖励券 、非免单订单 、且已到账的 、返利订单
@@ -1177,7 +1177,8 @@
   @Override
   public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state,
         Integer type, Integer orderState, String startTime, String endTime, Integer source)
         Integer type, Integer orderState, String startTime, String endTime, Integer source,List<Long> listShopId,
         List<Long> listGoodsId, Date minTime, BigDecimal money)
         throws CommonOrderException {
      List<CommonOrderVO> list = null;
@@ -1185,10 +1186,11 @@
      if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
         list = commonOrderMapper.listQueryWithNoChild(start, count, keyType, key, state, type, orderState,
               startTime, endTime, source);
      } else
      } else {
         list = commonOrderMapper.listQuery(start, count, keyType, key, state, type, orderState, startTime, endTime,
               source);
               source, listShopId, listGoodsId, minTime, money);
      }
      if (list == null) {
         list = new ArrayList<CommonOrderVO>();
      }
@@ -1372,12 +1374,15 @@
   @Override
   public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
         String startTime, String endTime, Integer source) throws CommonOrderException {
         String startTime, String endTime, Integer source, List<Long> listShopId, List<Long> listGoodsId,
         Date minTime, BigDecimal money) throws CommonOrderException {
      if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
         return commonOrderMapper.countQueryWithNoChild(keyType, key, state, type, orderState, startTime, endTime,
               source);
      } else
         return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime, source);
      } else {
         return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime, source, listShopId,
               listGoodsId, minTime,money);
      }
   }
   @Override
@@ -1573,4 +1578,22 @@
      return commonOrderList.get(0);
   }
   @Override
   public CommonOrderVO firstValidOrderByUid(Long uid) {
      return commonOrderMapper.firstValidOrderByUid(uid, null, null);
   }
   @Override
   public CommonOrderVO firstValidOrderByUidAndType(Long uid, Integer type) {
      return commonOrderMapper.firstValidOrderByUid(uid, type, null);
   }
   @Override
   public CommonOrderVO firstValidOrderLastMonthByUidAndType(Long uid, Integer type) {
      return commonOrderMapper.firstValidOrderByUid(uid, type, 4);
   }
}