Authored by Lixiaodi

Merge branch 'dev_searchpool_order' into test6.8.7

... ... @@ -100,6 +100,8 @@ public class CouponRuleMatcher {
final CouponProductLimitTypeEnum limitTypeEnum = CouponProductLimitTypeEnum.of(couponsBo.getProductLimitType()).orElse(null);
if (limitTypeEnum == CouponProductLimitTypeEnum.SPECIFIC_PRODUCT) {
return couponsBo.getProductIdInclude().contains(chargeGoods.getProductId());
} else if (limitTypeEnum == CouponProductLimitTypeEnum.NON) {
return true;
} else {
//目前不存在
return false;
... ...
... ... @@ -50,7 +50,7 @@ public class CouponProxyService implements Compensator {
}
//过滤未生效的券
int currentTime = DateUtil.getCurrentTimeSecond();
return result.getCoupons().stream().filter(e -> e.getStartTime() < currentTime && e.getEndTime() > currentTime).collect(Collectors.toList());
return result.getCoupons().stream().filter(e -> e.getStartTime() <= currentTime && e.getEndTime() >= currentTime).collect(Collectors.toList());
}
public List<UserCouponsBo> checkAndGetCoupons(int uid, List<String> couponCodes) {
... ...
... ... @@ -70,9 +70,12 @@ public class ProductSearchController {
order = "pools.order_by:desc";
} else if (type == 2) {
isSoonSale = "Y";
} else {
}
}
if (StringUtils.isNotBlank(productPool)
&& StringUtils.isBlank(query)
&& StringUtils.isBlank(order)) {
order = "pools.order_by:desc"; // 如果走商品池接口,默认走排序倒序接口
}
SortIdLevel sortIdLevel = productSearchService.getSortLevelById(sort);
ProductSearchReq req = new ProductSearchReq().setOrder(order).setId(id).setPool(productPool).setBrand(brand).setMidSort(sortIdLevel.getMidSortId()).setMaxSort(sortIdLevel.getMaxSortId())
... ...