mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-24 16:05:08 +08:00
code review:积分、优惠劵、佣金等逻辑
This commit is contained in:
@ -22,12 +22,16 @@ public interface ProductSpuApi {
|
||||
List<ProductSpuRespDTO> getSpuList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 批量查询 SPU 数组,并且校验是否 SPU 是否有效
|
||||
* 批量查询 SPU 数组,并且校验是否 SPU 是否有效。
|
||||
*
|
||||
* 如下情况,视为无效:
|
||||
* 1. 商品编号不存在
|
||||
* 2. 商品被禁用
|
||||
*
|
||||
* @param ids SPU 编号列表
|
||||
* @return SPU 数组
|
||||
*/
|
||||
List<ProductSpuRespDTO> getSpuListAndValidate(Collection<Long> ids);
|
||||
List<ProductSpuRespDTO> validateSpuList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得 SPU
|
||||
@ -36,12 +40,4 @@ public interface ProductSpuApi {
|
||||
*/
|
||||
ProductSpuRespDTO getSpu(Long id);
|
||||
|
||||
/**
|
||||
* 校验商品是否有效。如下情况,视为无效:
|
||||
* 1. 商品编号不存在
|
||||
* 2. 商品被禁用
|
||||
*
|
||||
* @param ids 商品编号数组
|
||||
*/
|
||||
void validateSpuList(Collection<Long> ids);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public interface ErrorCodeConstants {
|
||||
// ========== 商品 SPU 1-008-005-000 ==========
|
||||
ErrorCode SPU_NOT_EXISTS = new ErrorCode(1_008_005_000, "商品 SPU 不存在");
|
||||
ErrorCode SPU_SAVE_FAIL_CATEGORY_LEVEL_ERROR = new ErrorCode(1_008_005_001, "商品分类不正确,原因:必须使用第二级的商品分类及以下");
|
||||
ErrorCode SPU_NOT_ENABLE = new ErrorCode(1_008_005_002, "商品 SPU【[]】不处于上架状态");
|
||||
ErrorCode SPU_NOT_ENABLE = new ErrorCode(1_008_005_002, "商品 SPU【{}】不处于上架状态");
|
||||
ErrorCode SPU_NOT_RECYCLE = new ErrorCode(1_008_005_003, "商品 SPU 不处于回收站状态");
|
||||
|
||||
// ========== 商品 SKU 1-008-006-000 ==========
|
||||
|
Reference in New Issue
Block a user