后端:商品确认下单的信息 api 接口,后续需要结合促销,完善这个接口。
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.mall.promotion.biz.dataobject;
|
||||
|
||||
import cn.iocoder.common.framework.dataobject.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 促销活动 DO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PromotionActivityDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 活动编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 活动标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 活动类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class ProductRecommendServiceImpl implements ProductRecommendService {
|
||||
return CommonResult.error(SysErrorCodeEnum.VALIDATION_REQUEST_PARAM_ERROR.getCode(), "推荐类型必须是新品(1)或热卖(2)"); // TODO 有点搓
|
||||
}
|
||||
// 校验商品不存在
|
||||
if (productSpuService.getProductSpu(productRecommendAddDTO.getProductSpuId()) == null) {
|
||||
if (productSpuService.getProductSpuDetail(productRecommendAddDTO.getProductSpuId()) == null) {
|
||||
return ServiceExceptionUtil.error(PromotionErrorCodeEnum.PRODUCT_RECOMMEND_PRODUCT_NOT_EXISTS.getCode());
|
||||
}
|
||||
// 校验商品是否已经推荐
|
||||
@@ -84,7 +84,7 @@ public class ProductRecommendServiceImpl implements ProductRecommendService {
|
||||
return ServiceExceptionUtil.error(PromotionErrorCodeEnum.PRODUCT_RECOMMEND_NOT_EXISTS.getCode());
|
||||
}
|
||||
// 校验商品不存在
|
||||
if (productSpuService.getProductSpu(productRecommendUpdateDTO.getProductSpuId()) == null) {
|
||||
if (productSpuService.getProductSpuDetail(productRecommendUpdateDTO.getProductSpuId()) == null) {
|
||||
return ServiceExceptionUtil.error(PromotionErrorCodeEnum.PRODUCT_RECOMMEND_PRODUCT_NOT_EXISTS.getCode());
|
||||
}
|
||||
// 校验商品是否已经推荐
|
||||
@@ -130,4 +130,4 @@ public class ProductRecommendServiceImpl implements ProductRecommendService {
|
||||
return CommonResult.success(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user