Merge branch 'dev_searchpool_order' into test6.8.7
Showing
3 changed files
with
8 additions
and
3 deletions
@@ -100,6 +100,8 @@ public class CouponRuleMatcher { | @@ -100,6 +100,8 @@ public class CouponRuleMatcher { | ||
100 | final CouponProductLimitTypeEnum limitTypeEnum = CouponProductLimitTypeEnum.of(couponsBo.getProductLimitType()).orElse(null); | 100 | final CouponProductLimitTypeEnum limitTypeEnum = CouponProductLimitTypeEnum.of(couponsBo.getProductLimitType()).orElse(null); |
101 | if (limitTypeEnum == CouponProductLimitTypeEnum.SPECIFIC_PRODUCT) { | 101 | if (limitTypeEnum == CouponProductLimitTypeEnum.SPECIFIC_PRODUCT) { |
102 | return couponsBo.getProductIdInclude().contains(chargeGoods.getProductId()); | 102 | return couponsBo.getProductIdInclude().contains(chargeGoods.getProductId()); |
103 | + } else if (limitTypeEnum == CouponProductLimitTypeEnum.NON) { | ||
104 | + return true; | ||
103 | } else { | 105 | } else { |
104 | //目前不存在 | 106 | //目前不存在 |
105 | return false; | 107 | return false; |
@@ -50,7 +50,7 @@ public class CouponProxyService implements Compensator { | @@ -50,7 +50,7 @@ public class CouponProxyService implements Compensator { | ||
50 | } | 50 | } |
51 | //过滤未生效的券 | 51 | //过滤未生效的券 |
52 | int currentTime = DateUtil.getCurrentTimeSecond(); | 52 | int currentTime = DateUtil.getCurrentTimeSecond(); |
53 | - return result.getCoupons().stream().filter(e -> e.getStartTime() < currentTime && e.getEndTime() > currentTime).collect(Collectors.toList()); | 53 | + return result.getCoupons().stream().filter(e -> e.getStartTime() <= currentTime && e.getEndTime() >= currentTime).collect(Collectors.toList()); |
54 | } | 54 | } |
55 | 55 | ||
56 | public List<UserCouponsBo> checkAndGetCoupons(int uid, List<String> couponCodes) { | 56 | public List<UserCouponsBo> checkAndGetCoupons(int uid, List<String> couponCodes) { |
@@ -70,9 +70,12 @@ public class ProductSearchController { | @@ -70,9 +70,12 @@ public class ProductSearchController { | ||
70 | order = "pools.order_by:desc"; | 70 | order = "pools.order_by:desc"; |
71 | } else if (type == 2) { | 71 | } else if (type == 2) { |
72 | isSoonSale = "Y"; | 72 | isSoonSale = "Y"; |
73 | - } else { | ||
74 | - | ||
75 | } | 73 | } |
74 | + } | ||
75 | + if (StringUtils.isNotBlank(productPool) | ||
76 | + && StringUtils.isBlank(query) | ||
77 | + && StringUtils.isBlank(order)) { | ||
78 | + order = "pools.order_by:desc"; // 如果走商品池接口,默认走排序倒序接口 | ||
76 | } | 79 | } |
77 | SortIdLevel sortIdLevel = productSearchService.getSortLevelById(sort); | 80 | SortIdLevel sortIdLevel = productSearchService.getSortLevelById(sort); |
78 | ProductSearchReq req = new ProductSearchReq().setOrder(order).setId(id).setPool(productPool).setBrand(brand).setMidSort(sortIdLevel.getMidSortId()).setMaxSort(sortIdLevel.getMaxSortId()) | 81 | ProductSearchReq req = new ProductSearchReq().setOrder(order).setId(id).setPool(productPool).setBrand(brand).setMidSort(sortIdLevel.getMidSortId()).setMaxSort(sortIdLevel.getMaxSortId()) |
-
Please register or login to post a comment