mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 05:09:21 +08:00
docs: 发布 DTO 图片字段注释与 pdd.goods.add 文档对齐
This commit is contained in:
@@ -14,6 +14,11 @@ API文档/商品API/pdd.goods.add
|
||||
|
||||
单个商品发布,需要配合pdd.goods.img.upload上传主图及商品详情图片。
|
||||
|
||||
> **与本系统 `PddGoodsPublishDTO` 对照**(勿与轮播混淆)
|
||||
> - `carousel_gallery` → `carouselImages`(商品轮播图,1:1,必填)
|
||||
> - `detail_gallery` → `detailImages`(商品详情图,必填)
|
||||
> - `image_url` → `imageUrl`(**商品主图**,首页大图 750×352,非必填;部分活动必填)
|
||||
|
||||
### 公共参数
|
||||
|
||||
|
||||
|
||||
+12
-3
@@ -63,15 +63,24 @@ public class PddGoodsPublishDTO {
|
||||
@Max(value = 100, message = "满两件折扣范围为0-100")
|
||||
private Integer twoPiecesDiscount = 95;
|
||||
|
||||
/** 轮播图:本系统 fileId,或已是拼多多 CDN 的 URL */
|
||||
/**
|
||||
* 商品轮播图,对应开放平台 {@code carousel_gallery}(必填)。
|
||||
* 入参为本系统 fileId 或已转传的拼多多 CDN URL;规格见 pdd.goods.add 文档。
|
||||
*/
|
||||
@NotEmpty(message = "轮播图不能为空")
|
||||
private List<String> carouselImages;
|
||||
|
||||
/** 详情图 */
|
||||
/**
|
||||
* 商品详情图,对应开放平台 {@code detail_gallery}(必填)。
|
||||
* 入参为本系统 fileId 或已转传的 URL;规格见 pdd.goods.add 文档。
|
||||
*/
|
||||
@NotEmpty(message = "详情图不能为空")
|
||||
private List<String> detailImages;
|
||||
|
||||
/** 活动主图(可选):fileId 或 URL */
|
||||
/**
|
||||
* 商品主图,对应开放平台 {@code image_url}(非必填;参加部分活动则必填)。
|
||||
* 与轮播图不同:首页大图 750×352 等约束见 pdd.goods.add 文档。入参为 fileId 或 URL。
|
||||
*/
|
||||
private String imageUrl;
|
||||
|
||||
/** 商品属性(类目模板非销售属性) */
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class PddGoodsPublishSkuDTO {
|
||||
@NotNull(message = "重量不能为空")
|
||||
private Long weight;
|
||||
|
||||
/** 缩略图:fileId 或 URL */
|
||||
/** SKU 缩略图,对应 sku_list.thumb_url(必填);fileId 或已转传 URL */
|
||||
@NotBlank(message = "SKU缩略图不能为空")
|
||||
private String thumbImage;
|
||||
|
||||
|
||||
+1
@@ -344,6 +344,7 @@ public class PddGoodsPublishServiceImpl implements PddGoodsPublishService {
|
||||
|
||||
/**
|
||||
* 组装 POP 商品命令。strict=true 走发布强校验;false 仅要求能组包,缺图/SKU 交给平台报错。
|
||||
* 图片:carouselImages/detailImages/imageUrl 分别映射 carousel_gallery、detail_gallery、image_url(商品主图)。
|
||||
*/
|
||||
private PddGoodsPublishPopApiClient.GoodsAddCommand assembleAddCommand(
|
||||
PddGoodsPublishDTO dto, Long companyId, ShopAuth ctx, boolean strict) throws Exception {
|
||||
|
||||
+5
@@ -726,6 +726,11 @@ public class PddGoodsPublishPopApiClient {
|
||||
String specIdList, List<SkuPropertyItem> skuProperties) {
|
||||
}
|
||||
|
||||
/**
|
||||
* pdd.goods.add / 草稿提交共用上行;字段名与开放平台一致。
|
||||
* 与 {@link top.xyquan.ecomdmbbackend.modules.channel.pdd.goods.model.dto.publish.PddGoodsPublishDTO}
|
||||
* 映射:carouselImages→carouselGallery,detailImages→detailGallery,imageUrl→imageUrl(商品主图)。
|
||||
*/
|
||||
public record GoodsAddCommand(
|
||||
String goodsName,
|
||||
String goodsDesc,
|
||||
|
||||
Reference in New Issue
Block a user