product:完善 App 商品详情接口

This commit is contained in:
YunaiV
2022-12-14 22:02:07 +08:00
parent b7c447897b
commit 652428a723
18 changed files with 300 additions and 70 deletions

View File

@ -33,6 +33,7 @@ public interface ErrorCodeConstants {
// ========== 商品 SPU 1008005000 ==========
ErrorCode SPU_NOT_EXISTS = new ErrorCode(1008005000, "商品 SPU 不存在");
ErrorCode SPU_SAVE_FAIL_CATEGORY_LEVEL_ERROR = new ErrorCode(1008005001, "商品分类不正确,原因:必须使用第三级的商品分类下");
ErrorCode SPU_NOT_ENABLE = new ErrorCode(1008005002, "商品 SPU 不处于上架状态");
// ========== 商品 SKU 1008006000 ==========
ErrorCode SKU_NOT_EXISTS = new ErrorCode(1008006000, "商品 SKU 不存在");

View File

@ -35,4 +35,14 @@ public enum ProductSpuStatusEnum implements IntArrayValuable {
return ARRAYS;
}
/**
* 判断是否处于【上架】状态
*
* @param status 状态
* @return 是否处于【上架】状态
*/
public static boolean isEnable(Integer status) {
return ENABLE.getStatus().equals(status);
}
}