【代码优化】商城: 满减送活动

This commit is contained in:
puhui999
2024-09-10 11:46:21 +08:00
parent 15f46db7ac
commit d9856ff79b
9 changed files with 123 additions and 124 deletions

View File

@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.promotion.api.reward;
import cn.iocoder.yudao.module.promotion.api.reward.dto.RewardActivityMatchRespDTO;
import java.util.Collection;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -12,13 +12,13 @@ import java.util.List;
*/
public interface RewardActivityApi {
/**
* 基于指定的 SPU 编号数组,获得它们匹配的满减送活动
* 获得当前时间内开启的满减送活动
*
* @param spuIds SPU 编号数组
* @param status 状态
* @param dateTime 时间
* @return 满减送活动列表
*/
List<RewardActivityMatchRespDTO> getMatchRewardActivityList(Collection<Long> spuIds);
List<RewardActivityMatchRespDTO> getRewardActivityListByStatusAndNow(Integer status, LocalDateTime dateTime);
}

View File

@@ -46,6 +46,7 @@ public interface ErrorCodeConstants {
ErrorCode REWARD_ACTIVITY_CLOSE_FAIL_STATUS_CLOSED = new ErrorCode(1_013_006_004, "满减送活动已关闭,不能重复关闭");
ErrorCode REWARD_ACTIVITY_SCOPE_ALL_EXISTS = new ErrorCode(1_013_006_005, "已存在商品范围为全场的满减送活动");
ErrorCode REWARD_ACTIVITY_SCOPE_CATEGORY_EXISTS = new ErrorCode(1_013_006_006, "存在商品类型参加了其它满减送活动");
ErrorCode REWARD_ACTIVITY_TIME_CONFLICTS = new ErrorCode(1_013_006_007, "满减送活动时段冲突");
// ========== TODO 空着 1-013-007-000 ============