fix: 优化部分优惠券初始化及搜索条件

This commit is contained in:
misworga831
2023-10-16 18:34:55 +08:00
parent f9b3001eb3
commit 8b61d40ff8
3 changed files with 11 additions and 1 deletions

View File

@@ -71,7 +71,11 @@ public class BasePromotionsSearchParams {
queryWrapper.eq("scope_type", scopeType);
}
if (CharSequenceUtil.isNotEmpty(storeId)) {
queryWrapper.in("store_id", Arrays.asList(storeId.split(",")));
if ("store".equals(storeId)) {
queryWrapper.ne("store_id", PromotionTools.PLATFORM_ID);
} else {
queryWrapper.in("store_id", Arrays.asList(storeId.split(",")));
}
}
queryWrapper.eq("delete_flag", false);
return queryWrapper;

View File

@@ -245,6 +245,9 @@ public class SeckillServiceImpl extends AbstractPromotionsServiceImpl<SeckillMap
if (promotions.getStartTime() != null && promotions.getEndTime() == null) {
promotions.setEndTime(DateUtil.endOfDay(promotions.getStartTime()));
}
if (promotions.getApplyEndTime() == null && promotions.getStartTime() != null) {
promotions.setApplyEndTime(promotions.getStartTime());
}
}
/**