mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-15 02:31:53 +08:00
SPU: 完善选择优惠卷
This commit is contained in:
@@ -97,7 +97,7 @@ public class ProductSpuBaseVO {
|
||||
private Integer giveIntegral;
|
||||
|
||||
@Schema(description = "赠送的优惠劵数组包含优惠券编号和名称")
|
||||
private List<GiveCouponTemplate> giveCouponTemplate;
|
||||
private List<GiveCouponTemplate> giveCouponTemplates;
|
||||
|
||||
@Schema(description = "分销类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
@NotNull(message = "商品分销类型不能为空")
|
||||
|
@@ -107,7 +107,7 @@ public interface ProductSpuConvert {
|
||||
List<CouponTemplateRespDTO> couponTemplateList) {
|
||||
ProductSpuDetailRespVO respVO = convert03(spu);
|
||||
respVO.setSkus(ProductSkuConvert.INSTANCE.convertList(skus));
|
||||
respVO.setGiveCouponTemplate(convertList04(couponTemplateList));
|
||||
respVO.setGiveCouponTemplates(convertList04(couponTemplateList));
|
||||
return respVO;
|
||||
}
|
||||
|
||||
|
@@ -194,7 +194,7 @@ public class ProductSpuDO extends BaseDO {
|
||||
* 对应 PromotionTypeEnum 枚举
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<Integer> activityOrders;
|
||||
private List<Integer> activityOrders; // TODO @芋艿: 活动顺序字段长度需要增加
|
||||
|
||||
// ========== 统计相关字段 =========
|
||||
|
||||
|
@@ -56,6 +56,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
private ProductCategoryService categoryService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private CouponTemplateApi couponTemplateApi;
|
||||
|
||||
@Override
|
||||
@@ -65,7 +66,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
validateCategory(createReqVO.getCategoryId());
|
||||
brandService.validateProductBrand(createReqVO.getBrandId());
|
||||
// 校验优惠券
|
||||
Set<Long> giveCouponTemplateIds = convertSet(createReqVO.getGiveCouponTemplate(), ProductSpuCreateReqVO.GiveCouponTemplate::getId);
|
||||
Set<Long> giveCouponTemplateIds = convertSet(createReqVO.getGiveCouponTemplates(), ProductSpuCreateReqVO.GiveCouponTemplate::getId);
|
||||
validateCouponTemplate(giveCouponTemplateIds);
|
||||
// 校验 SKU
|
||||
List<ProductSkuCreateOrUpdateReqVO> skuSaveReqList = createReqVO.getSkus();
|
||||
@@ -93,7 +94,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
validateCategory(updateReqVO.getCategoryId());
|
||||
brandService.validateProductBrand(updateReqVO.getBrandId());
|
||||
// 校验优惠券
|
||||
Set<Long> giveCouponTemplateIds = convertSet(updateReqVO.getGiveCouponTemplate(), ProductSpuUpdateReqVO.GiveCouponTemplate::getId);
|
||||
Set<Long> giveCouponTemplateIds = convertSet(updateReqVO.getGiveCouponTemplates(), ProductSpuUpdateReqVO.GiveCouponTemplate::getId);
|
||||
validateCouponTemplate(giveCouponTemplateIds);
|
||||
// 校验SKU
|
||||
List<ProductSkuCreateOrUpdateReqVO> skuSaveReqList = updateReqVO.getSkus();
|
||||
|
Reference in New Issue
Block a user