Authored by chenchao

Merge branch 'master' into hotfix_线上线下订单号隔离

... ... @@ -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) {
... ...
... ... @@ -73,6 +73,8 @@ public class ProductSearchController {
} else {
}
} else if (null != productPool) {
order = null == order ? "pools.order_by:desc" : order; // 如果走商品池接口,默认走排序倒序接口
}
SortIdLevel sortIdLevel = productSearchService.getSortLevelById(sort);
ProductSearchReq req = new ProductSearchReq().setOrder(order).setId(id).setPool(productPool).setBrand(brand).setMidSort(sortIdLevel.getMidSortId()).setMaxSort(sortIdLevel.getMaxSortId())
... ...