From b53c2e60dadac9cd51bb46f6b1f7ce5bf7f0bde1 Mon Sep 17 00:00:00 2001 From: zjf <1799650030@qq.com> Date: Mon, 23 Jun 2025 12:34:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/ShopCategoryEntity.java | 0 .../supermarket/entity/ShopSkuEntity.java | 0 .../supermarket/entity/ShopSpuEntity.java | 6 +- .../supermarket/vo/app/ShopSkuAppVo.java | 48 ++++++++++++- .../vo/app/ShopSpuDetailAppVo.java | 72 +++++++++++++++++-- .../supermarket/vo/app/ShopSpuListAppVo.java | 35 +++++++-- .../main/resources/mapper/ShopSpuMapper.xml | 2 +- 7 files changed, 145 insertions(+), 18 deletions(-) rename pjcloud-supermarket/{pjcloud-supermarket-biz => pjcloud-supermarket-api}/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopCategoryEntity.java (100%) rename pjcloud-supermarket/{pjcloud-supermarket-biz => pjcloud-supermarket-api}/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSkuEntity.java (100%) rename pjcloud-supermarket/{pjcloud-supermarket-biz => pjcloud-supermarket-api}/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java (96%) diff --git a/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopCategoryEntity.java b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopCategoryEntity.java similarity index 100% rename from pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopCategoryEntity.java rename to pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopCategoryEntity.java diff --git a/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSkuEntity.java b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSkuEntity.java similarity index 100% rename from pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSkuEntity.java rename to pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSkuEntity.java diff --git a/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java similarity index 96% rename from pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java rename to pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java index abfde0a11..9b613b07a 100644 --- a/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java +++ b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/entity/ShopSpuEntity.java @@ -104,7 +104,7 @@ public class ShopSpuEntity extends Model { * 商户关系表 */ @Schema(description="商户关系表") - private Long merchantRelationId; + private String merchantIds; /** * 部门id @@ -176,8 +176,4 @@ public class ShopSpuEntity extends Model { @EntityMapping(thisField = "id", joinField = "spuId") private List skuList; - - @TableField(exist = false) - @Schema(description="关联的商户id") - private List merchantIds; } \ No newline at end of file diff --git a/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSkuAppVo.java b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSkuAppVo.java index f2a5b2c89..b6d27b7d9 100644 --- a/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSkuAppVo.java +++ b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSkuAppVo.java @@ -1,11 +1,53 @@ package com.bsd.pjcloud.supermarket.vo.app; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.time.LocalDateTime; + @Data public class ShopSkuAppVo { + /** + * 包装单位id + */ + @Schema(description="包装单位id") private Long id; - private String skuName; - private Integer price; - private Integer stock; + /** + * 条码 + */ + @Schema(description="条码") + private String barCode; + /** + * 规格 + */ + @Schema(description="规格") + private String spec; + /** + * 单位 + */ + @Schema(description="单位") + private String unit; + + /** + * 零售价/单位分 + */ + @Schema(description="零售价/单位分") + private Integer retailPrice; + + /** + * 促销价 + */ + @Schema(description="促销价") + private Integer promotionPrice; + /** + * 库存 + */ + @Schema(description="库存") + private Double stock; + /** + * sku属性 + */ + @Schema(description="sku属性") + private String attribute; } \ No newline at end of file diff --git a/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuDetailAppVo.java b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuDetailAppVo.java index 5a9b9771c..a4cbe538b 100644 --- a/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuDetailAppVo.java +++ b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuDetailAppVo.java @@ -1,16 +1,80 @@ package com.bsd.pjcloud.supermarket.vo.app; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.baomidou.mybatisplus.annotation.*; +import com.github.yulichang.annotation.EntityMapping; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; + +import java.time.LocalDateTime; import java.util.List; @Data public class ShopSpuDetailAppVo { + /** + * 商品 SPU 编号,自增 + */ + @Schema(description="商品 SPU 编号,自增") private Long id; + + /** + * 货号 + */ + @Schema(description="货号") + private String productCode; + + /** + * 商品名称 + */ + @Schema(description="商品名称") private String productName; + + + /** + * 商品详情 + */ + @Schema(description="商品详情") + private String description; + + /** + * 商品分类编号 + */ + @Schema(description="商品分类编号") + private Long categoryId; + + /** + * 商品封面图 + */ + @Schema(description="商品封面图") private String picUrl; - private String subTitle; - private String detail; - private Integer categoryId; - private Integer status; + + /** + * 商品轮播图地址 + 数组,以逗号分隔 + 最多上传15张 + */ + @Schema(description="商品轮播图地址") + private String sliderPicUrls; + + + /** + * 商户关系表 + */ + @Schema(description="商户关系表") + private String merchantIds; + + /** + * 销量 + */ + @Schema(description="销量") + private Integer salesCount; + + /** + * 单人限购数量 + */ + @Schema(description="单人限购数量") + private Integer limitNum; + + private List skuList; } \ No newline at end of file diff --git a/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuListAppVo.java b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuListAppVo.java index e0e7ba92d..fe6e1b535 100644 --- a/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuListAppVo.java +++ b/pjcloud-supermarket/pjcloud-supermarket-api/src/main/java/com/bsd/pjcloud/supermarket/vo/app/ShopSpuListAppVo.java @@ -1,15 +1,40 @@ package com.bsd.pjcloud.supermarket.vo.app; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data public class ShopSpuListAppVo { + /** + * 商品 SPU 编号,自增 + */ + @Schema(description="商品 SPU 编号,自增") private Long id; + + /** + * 货号 + */ + @Schema(description="货号") + private String productCode; + + /** + * 商品名称 + */ + @Schema(description="商品名称") private String productName; + + /** + * 商品封面图 + */ + @Schema(description="商品封面图") private String picUrl; - private String subTitle; - private Integer categoryId; - private Integer status; - private Integer sales; - private Integer price; + + /** + * 商品分类编号 + */ + @Schema(description="商品分类编号") + private Long categoryId; + } \ No newline at end of file diff --git a/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/resources/mapper/ShopSpuMapper.xml b/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/resources/mapper/ShopSpuMapper.xml index 0b254c802..977244bc3 100644 --- a/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/resources/mapper/ShopSpuMapper.xml +++ b/pjcloud-supermarket/pjcloud-supermarket-biz/src/main/resources/mapper/ShopSpuMapper.xml @@ -16,7 +16,7 @@ - +