Commit 854ba3315ccfc0080850dcac6e81bee03c3e17fc
1 parent
7b98a3f3
marge master
Showing
335 changed files
with
16 additions
and
21122 deletions
Too many changes.
To preserve performance only 100 of 335 files are displayed.
yudao-module-mall/pom.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | - <parent> | ||
| 6 | - <artifactId>yudao</artifactId> | ||
| 7 | - <groupId>cn.iocoder.boot</groupId> | ||
| 8 | - <version>${revision}</version> | ||
| 9 | - </parent> | ||
| 10 | - <modelVersion>4.0.0</modelVersion> | ||
| 11 | - | ||
| 12 | - <artifactId>yudao-module-mall</artifactId> | ||
| 13 | - <packaging>pom</packaging> | ||
| 14 | - | ||
| 15 | - <name>${project.artifactId}</name> | ||
| 16 | - | ||
| 17 | - <description> | ||
| 18 | - ๅๅๅคงๆจกๅ๏ผ็ฑ product ๅๅใpromotion ่ฅ้ใtrade ไบคๆ็ญ็ปๆ | ||
| 19 | - </description> | ||
| 20 | - <modules> | ||
| 21 | - <module>yudao-module-promotion-api</module> | ||
| 22 | - <module>yudao-module-promotion-biz</module> | ||
| 23 | - <module>yudao-module-product-api</module> | ||
| 24 | - <module>yudao-module-product-biz</module> | ||
| 25 | - <module>yudao-module-trade-api</module> | ||
| 26 | - <module>yudao-module-trade-biz</module> | ||
| 27 | - </modules> | ||
| 28 | - | ||
| 29 | -</project> |
yudao-module-mall/yudao-module-product-api/pom.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | - <modelVersion>4.0.0</modelVersion> | ||
| 6 | - <parent> | ||
| 7 | - <groupId>cn.iocoder.boot</groupId> | ||
| 8 | - <artifactId>yudao-module-mall</artifactId> | ||
| 9 | - <version>${revision}</version> | ||
| 10 | - </parent> | ||
| 11 | - | ||
| 12 | - <artifactId>yudao-module-product-api</artifactId> | ||
| 13 | - <packaging>jar</packaging> | ||
| 14 | - | ||
| 15 | - <name>${project.artifactId}</name> | ||
| 16 | - <description> | ||
| 17 | - product ๆจกๅ API๏ผๆด้ฒ็ปๅ ถๅฎๆจกๅ่ฐ็จ | ||
| 18 | - </description> | ||
| 19 | - | ||
| 20 | - <dependencies> | ||
| 21 | - <dependency> | ||
| 22 | - <groupId>cn.iocoder.boot</groupId> | ||
| 23 | - <artifactId>yudao-common</artifactId> | ||
| 24 | - </dependency> | ||
| 25 | - | ||
| 26 | - <!-- ๅๆฐๆ ก้ช --> | ||
| 27 | - <dependency> | ||
| 28 | - <groupId>org.springframework.boot</groupId> | ||
| 29 | - <artifactId>spring-boot-starter-validation</artifactId> | ||
| 30 | - <optional>true</optional> | ||
| 31 | - </dependency> | ||
| 32 | - </dependencies> | ||
| 33 | - | ||
| 34 | -</project> |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/package-info.java deleted
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/property/ProductPropertyValueApi.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.api.property.dto.ProductPropertyValueDetailRespDTO; | ||
| 4 | - | ||
| 5 | -import java.util.Collection; | ||
| 6 | -import java.util.List; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * ๅๅๅฑๆงๅผ API ๆฅๅฃ | ||
| 10 | - * | ||
| 11 | - * @author ่้ๆบ็ | ||
| 12 | - */ | ||
| 13 | -public interface ProductPropertyValueApi { | ||
| 14 | - | ||
| 15 | - /** | ||
| 16 | - * ๆ นๆฎ็ผๅทๆฐ็ป๏ผ่ทๅพๅฑๆงๅผๅ่กจ | ||
| 17 | - * | ||
| 18 | - * @param ids ็ผๅทๆฐ็ป | ||
| 19 | - * @return ๅฑๆงๅผๆ็ปๅ่กจ | ||
| 20 | - */ | ||
| 21 | - List<ProductPropertyValueDetailRespDTO> getPropertyValueDetailList(Collection<Long> ids); | ||
| 22 | - | ||
| 23 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/property/dto/ProductPropertyValueDetailRespDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.property.dto; | ||
| 2 | - | ||
| 3 | -import lombok.Data; | ||
| 4 | - | ||
| 5 | -/** | ||
| 6 | - * ๅๅๅฑๆง้กน็ๆ็ป Response DTO | ||
| 7 | - * | ||
| 8 | - * @author ่้ๆบ็ | ||
| 9 | - */ | ||
| 10 | -@Data | ||
| 11 | -public class ProductPropertyValueDetailRespDTO { | ||
| 12 | - | ||
| 13 | - /** | ||
| 14 | - * ๅฑๆง็็ผๅท | ||
| 15 | - */ | ||
| 16 | - private Long propertyId; | ||
| 17 | - | ||
| 18 | - /** | ||
| 19 | - * ๅฑๆง็ๅ็งฐ | ||
| 20 | - */ | ||
| 21 | - private String propertyName; | ||
| 22 | - | ||
| 23 | - /** | ||
| 24 | - * ๅฑๆงๅผ็็ผๅท | ||
| 25 | - */ | ||
| 26 | - private Long valueId; | ||
| 27 | - | ||
| 28 | - /** | ||
| 29 | - * ๅฑๆงๅผ็ๅ็งฐ | ||
| 30 | - */ | ||
| 31 | - private String valueName; | ||
| 32 | - | ||
| 33 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/ProductSkuApi.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.sku; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuUpdateStockReqDTO; | ||
| 4 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO; | ||
| 5 | - | ||
| 6 | -import java.util.Collection; | ||
| 7 | -import java.util.List; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅ SKU API ๆฅๅฃ | ||
| 11 | - * | ||
| 12 | - * @author LeeYan9 | ||
| 13 | - * @since 2022-08-26 | ||
| 14 | - */ | ||
| 15 | -public interface ProductSkuApi { | ||
| 16 | - | ||
| 17 | - /** | ||
| 18 | - * ๆฅ่ฏข SKU ไฟกๆฏ | ||
| 19 | - * | ||
| 20 | - * @param id SKU ็ผๅท | ||
| 21 | - * @return SKU ไฟกๆฏ | ||
| 22 | - */ | ||
| 23 | - ProductSkuRespDTO getSku(Long id); | ||
| 24 | - | ||
| 25 | - /** | ||
| 26 | - * ๆน้ๆฅ่ฏข SKU ๆฐ็ป | ||
| 27 | - * | ||
| 28 | - * @param ids SKU ็ผๅทๅ่กจ | ||
| 29 | - * @return SKU ๆฐ็ป | ||
| 30 | - */ | ||
| 31 | - List<ProductSkuRespDTO> getSkuList(Collection<Long> ids); | ||
| 32 | - | ||
| 33 | - /** | ||
| 34 | - * ๆดๆฐ SKU ๅบๅญ | ||
| 35 | - * | ||
| 36 | - * @param updateStockReqDTO ๆดๆฐ่ฏทๆฑ | ||
| 37 | - */ | ||
| 38 | - void updateSkuStock(ProductSkuUpdateStockReqDTO updateStockReqDTO); | ||
| 39 | - | ||
| 40 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuRespDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.sku.dto; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -import java.util.List; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * ๅๅ SKU ไฟกๆฏ Response DTO | ||
| 10 | - * | ||
| 11 | - * @author LeeYan9 | ||
| 12 | - * @since 2022-08-26 | ||
| 13 | - */ | ||
| 14 | -@Data | ||
| 15 | -public class ProductSkuRespDTO { | ||
| 16 | - | ||
| 17 | - /** | ||
| 18 | - * ๅๅ SKU ็ผๅท๏ผ่ชๅข | ||
| 19 | - */ | ||
| 20 | - private Long id; | ||
| 21 | - /** | ||
| 22 | - * SPU ็ผๅท | ||
| 23 | - */ | ||
| 24 | - private Long spuId; | ||
| 25 | - /** | ||
| 26 | - * SPU ๅๅญ | ||
| 27 | - */ | ||
| 28 | - private String spuName; | ||
| 29 | - | ||
| 30 | - /** | ||
| 31 | - * ๅฑๆงๆฐ็ป๏ผJSON ๆ ผๅผ | ||
| 32 | - */ | ||
| 33 | - private List<Property> properties; | ||
| 34 | - /** | ||
| 35 | - * ้ๅฎไปทๆ ผ๏ผๅไฝ๏ผๅ | ||
| 36 | - */ | ||
| 37 | - private Integer price; | ||
| 38 | - /** | ||
| 39 | - * ๅธๅบไปท๏ผๅไฝ๏ผๅ | ||
| 40 | - */ | ||
| 41 | - private Integer marketPrice; | ||
| 42 | - /** | ||
| 43 | - * ๆๆฌไปท๏ผๅไฝ๏ผๅ | ||
| 44 | - */ | ||
| 45 | - private Integer costPrice; | ||
| 46 | - /** | ||
| 47 | - * SKU ็ๆกๅฝข็ | ||
| 48 | - */ | ||
| 49 | - private String barCode; | ||
| 50 | - /** | ||
| 51 | - * ๅพ็ๅฐๅ | ||
| 52 | - */ | ||
| 53 | - private String picUrl; | ||
| 54 | - /** | ||
| 55 | - * SKU ็ถๆ | ||
| 56 | - * <p> | ||
| 57 | - * ๆไธพ {@link CommonStatusEnum} | ||
| 58 | - */ | ||
| 59 | - private Integer status; | ||
| 60 | - /** | ||
| 61 | - * ๅบๅญ | ||
| 62 | - */ | ||
| 63 | - private Integer stock; | ||
| 64 | - /** | ||
| 65 | - * ้ข่ญฆ้ขๅญ | ||
| 66 | - */ | ||
| 67 | - private Integer warnStock; | ||
| 68 | - /** | ||
| 69 | - * ๅๅ้้๏ผๅไฝ๏ผkg ๅๅ | ||
| 70 | - */ | ||
| 71 | - private Double weight; | ||
| 72 | - /** | ||
| 73 | - * ๅๅไฝ็งฏ๏ผๅไฝ๏ผm^3 ๅนณ็ฑณ | ||
| 74 | - */ | ||
| 75 | - private Double volume; | ||
| 76 | - | ||
| 77 | - /** | ||
| 78 | - * ๅๅๅฑๆง | ||
| 79 | - */ | ||
| 80 | - @Data | ||
| 81 | - public static class Property { | ||
| 82 | - | ||
| 83 | - /** | ||
| 84 | - * ๅฑๆง็ผๅท | ||
| 85 | - */ | ||
| 86 | - private Long propertyId; | ||
| 87 | - /** | ||
| 88 | - * ๅฑๆงๅผ็ผๅท | ||
| 89 | - */ | ||
| 90 | - private Long valueId; | ||
| 91 | - | ||
| 92 | - } | ||
| 93 | - | ||
| 94 | - | ||
| 95 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuUpdateStockReqDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.sku.dto; | ||
| 2 | - | ||
| 3 | -import lombok.AllArgsConstructor; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.NoArgsConstructor; | ||
| 6 | - | ||
| 7 | -import javax.validation.constraints.NotNull; | ||
| 8 | -import java.util.List; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * ๅๅ SKU ๆดๆฐๅบๅญ Request DTO | ||
| 12 | - * | ||
| 13 | - * @author LeeYan9 | ||
| 14 | - * @since 2022-08-26 | ||
| 15 | - */ | ||
| 16 | -@Data | ||
| 17 | -@NoArgsConstructor | ||
| 18 | -@AllArgsConstructor | ||
| 19 | -public class ProductSkuUpdateStockReqDTO { | ||
| 20 | - | ||
| 21 | - /** | ||
| 22 | - * ๅๅ SKU | ||
| 23 | - */ | ||
| 24 | - @NotNull(message = "ๅๅ SKU ไธ่ฝไธบ็ฉบ") | ||
| 25 | - private List<Item> items; | ||
| 26 | - | ||
| 27 | - @Data | ||
| 28 | - public static class Item { | ||
| 29 | - | ||
| 30 | - /** | ||
| 31 | - * ๅๅ SKU ็ผๅท | ||
| 32 | - */ | ||
| 33 | - @NotNull(message = "ๅๅ SKU ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 34 | - private Long id; | ||
| 35 | - | ||
| 36 | - /** | ||
| 37 | - * ๅบๅญๅๅๆฐ้ | ||
| 38 | - * | ||
| 39 | - * ๆญฃๆฐ๏ผๅขๅ ๅบๅญ | ||
| 40 | - * ่ดๆฐ๏ผๆฃๅๅบๅญ | ||
| 41 | - */ | ||
| 42 | - @NotNull(message = "ๅบๅญๅๅๆฐ้ไธ่ฝไธบ็ฉบ") | ||
| 43 | - private Integer incrCount; | ||
| 44 | - | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/ProductSpuApi.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO; | ||
| 4 | - | ||
| 5 | -import java.util.Collection; | ||
| 6 | -import java.util.List; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * ๅๅ SPU API ๆฅๅฃ | ||
| 10 | - * | ||
| 11 | - * @author LeeYan9 | ||
| 12 | - * @since 2022-08-26 | ||
| 13 | - */ | ||
| 14 | -public interface ProductSpuApi { | ||
| 15 | - | ||
| 16 | - /** | ||
| 17 | - * ๆน้ๆฅ่ฏข SPU ๆฐ็ป | ||
| 18 | - * | ||
| 19 | - * @param ids SPU ็ผๅทๅ่กจ | ||
| 20 | - * @return SPU ๆฐ็ป | ||
| 21 | - */ | ||
| 22 | - List<ProductSpuRespDTO> getSpuList(Collection<Long> ids); | ||
| 23 | - | ||
| 24 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/ProductSpuRespDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.spu.dto; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO; | ||
| 4 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuSpecTypeEnum; | ||
| 5 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; | ||
| 6 | -import lombok.Data; | ||
| 7 | - | ||
| 8 | -import java.util.List; | ||
| 9 | - | ||
| 10 | -// TODO @LeeYan9: ProductSpuRespDTO | ||
| 11 | -/** | ||
| 12 | - * ๅๅ SPU ไฟกๆฏ Response DTO | ||
| 13 | - * | ||
| 14 | - * @author LeeYan9 | ||
| 15 | - * @since 2022-08-26 | ||
| 16 | - */ | ||
| 17 | -@Data | ||
| 18 | -public class ProductSpuRespDTO { | ||
| 19 | - | ||
| 20 | - /** | ||
| 21 | - * ๅๅ SPU ็ผๅท๏ผ่ชๅข | ||
| 22 | - */ | ||
| 23 | - private Long id; | ||
| 24 | - | ||
| 25 | - // ========== ๅบๆฌไฟกๆฏ ========= | ||
| 26 | - | ||
| 27 | - /** | ||
| 28 | - * ๅๅๅ็งฐ | ||
| 29 | - */ | ||
| 30 | - private String name; | ||
| 31 | - /** | ||
| 32 | - * ๅๅ็ผ็ | ||
| 33 | - */ | ||
| 34 | - private String code; | ||
| 35 | - /** | ||
| 36 | - * ไฟ้่ฏญ | ||
| 37 | - */ | ||
| 38 | - private String sellPoint; | ||
| 39 | - /** | ||
| 40 | - * ๅๅ่ฏฆๆ | ||
| 41 | - */ | ||
| 42 | - private String description; | ||
| 43 | - /** | ||
| 44 | - * ๅๅๅ็ฑป็ผๅท | ||
| 45 | - */ | ||
| 46 | - private Long categoryId; | ||
| 47 | - /** | ||
| 48 | - * ๅๅๅ็็ผๅท | ||
| 49 | - */ | ||
| 50 | - private Long brandId; | ||
| 51 | - /** | ||
| 52 | - * ๅๅๅพ็็ๆฐ็ป | ||
| 53 | - * <p> | ||
| 54 | - * 1. ็ฌฌไธๅผ ๅพ็ๅฐไฝไธบๅๅไธปๅพ๏ผๆฏๆๅๆถไธไผ ๅคๅผ ๅพ๏ผ | ||
| 55 | - * 2. ๅปบ่ฎฎไฝฟ็จๅฐบๅฏธ 800x800 ๅ็ด ไปฅไธใๅคงๅฐไธ่ถ ่ฟ 1M ็ๆญฃๆนๅฝขๅพ็๏ผ | ||
| 56 | - * 3. ่ณๅฐ 1 ๅผ ๏ผๆๅคไธไผ 10 ๅผ | ||
| 57 | - */ | ||
| 58 | - private List<String> picUrls; | ||
| 59 | - /** | ||
| 60 | - * ๅๅ่ง้ข | ||
| 61 | - */ | ||
| 62 | - private String videoUrl; | ||
| 63 | - | ||
| 64 | - /** | ||
| 65 | - * ๆๅบๅญๆฎต | ||
| 66 | - */ | ||
| 67 | - private Integer sort; | ||
| 68 | - /** | ||
| 69 | - * ๅๅ็ถๆ | ||
| 70 | - * <p> | ||
| 71 | - * ๆไธพ {@link ProductSpuStatusEnum} | ||
| 72 | - */ | ||
| 73 | - private Integer status; | ||
| 74 | - | ||
| 75 | - // ========== SKU ็ธๅ ณๅญๆฎต ========= | ||
| 76 | - | ||
| 77 | - /** | ||
| 78 | - * ่งๆ ผ็ฑปๅ | ||
| 79 | - * <p> | ||
| 80 | - * ๆไธพ {@link ProductSpuSpecTypeEnum} | ||
| 81 | - */ | ||
| 82 | - private Integer specType; | ||
| 83 | - /** | ||
| 84 | - * ๆๅฐไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ | ||
| 85 | - * <p> | ||
| 86 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuRespDTO#getPrice()} ๆๅฐๅผ | ||
| 87 | - */ | ||
| 88 | - private Integer minPrice; | ||
| 89 | - /** | ||
| 90 | - * ๆๅคงไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ | ||
| 91 | - * <p> | ||
| 92 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuRespDTO#getPrice()} ๆๅคงๅผ | ||
| 93 | - */ | ||
| 94 | - private Integer maxPrice; | ||
| 95 | - /** | ||
| 96 | - * ๅธๅบไปท๏ผๅไฝไฝฟ็จ๏ผๅ | ||
| 97 | - * <p> | ||
| 98 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuRespDTO#getMarketPrice()} ๆๅคงๅผ | ||
| 99 | - */ | ||
| 100 | - private Integer marketPrice; | ||
| 101 | - /** | ||
| 102 | - * ๆปๅบๅญ | ||
| 103 | - * <p> | ||
| 104 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuRespDTO#getStock()} ๆฑๅ | ||
| 105 | - */ | ||
| 106 | - private Integer totalStock; | ||
| 107 | - /** | ||
| 108 | - * ๆฏๅฆๅฑ็คบๅบๅญ | ||
| 109 | - */ | ||
| 110 | - private Boolean showStock; | ||
| 111 | - | ||
| 112 | - // ========== ็ป่ฎก็ธๅ ณๅญๆฎต ========= | ||
| 113 | - | ||
| 114 | - /** | ||
| 115 | - * ๅๅ้้ | ||
| 116 | - */ | ||
| 117 | - private Integer salesCount; | ||
| 118 | - /** | ||
| 119 | - * ่ๆ้้ | ||
| 120 | - */ | ||
| 121 | - private Integer virtualSalesCount; | ||
| 122 | - /** | ||
| 123 | - * ๅๅ็นๅป้ | ||
| 124 | - */ | ||
| 125 | - private Integer clickCount; | ||
| 126 | - | ||
| 127 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/ErrorCodeConstants.java deleted
| 1 | -package cn.iocoder.yudao.module.product.enums; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||
| 4 | - | ||
| 5 | -/** | ||
| 6 | - * Product ้่ฏฏ็ ๆไธพ็ฑป | ||
| 7 | - * | ||
| 8 | - * product ็ณป็ป๏ผไฝฟ็จ 1-008-000-000 ๆฎต | ||
| 9 | - */ | ||
| 10 | -public interface ErrorCodeConstants { | ||
| 11 | - | ||
| 12 | - // ========== ๅๅๅ็ฑป็ธๅ ณ 1008001000 ============ | ||
| 13 | - ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(1008001000, "ๅๅๅ็ฑปไธๅญๅจ"); | ||
| 14 | - ErrorCode CATEGORY_PARENT_NOT_EXISTS = new ErrorCode(1008001001, "็ถๅ็ฑปไธๅญๅจ"); | ||
| 15 | - ErrorCode CATEGORY_PARENT_NOT_FIRST_LEVEL = new ErrorCode(1008001002, "็ถๅ็ฑปไธ่ฝๆฏไบ็บงๅ็ฑป"); | ||
| 16 | - ErrorCode CATEGORY_EXISTS_CHILDREN = new ErrorCode(1008001003, "ๅญๅจๅญๅ็ฑป๏ผๆ ๆณๅ ้ค"); | ||
| 17 | - ErrorCode CATEGORY_DISABLED = new ErrorCode(1008001004, "ๅๅๅ็ฑป({})ๅทฒ็ฆ็จ๏ผๆ ๆณไฝฟ็จ"); | ||
| 18 | - | ||
| 19 | - // ========== ๅๅๅ็็ธๅ ณ็ผๅท 1008002000 ========== | ||
| 20 | - ErrorCode BRAND_NOT_EXISTS = new ErrorCode(1008002000, "ๅ็ไธๅญๅจ"); | ||
| 21 | - ErrorCode BRAND_DISABLED = new ErrorCode(1008002001, "ๅ็ไธๅญๅจ"); | ||
| 22 | - ErrorCode BRAND_NAME_EXISTS = new ErrorCode(1008002002, "ๅ็ๅ็งฐๅทฒๅญๅจ"); | ||
| 23 | - | ||
| 24 | - // ========== ๅๅๅฑๆง้กน 1008003000 ========== | ||
| 25 | - ErrorCode PROPERTY_NOT_EXISTS = new ErrorCode(1008003000, "ๅฑๆง้กนไธๅญๅจ"); | ||
| 26 | - ErrorCode PROPERTY_EXISTS = new ErrorCode(1008003001, "ๅฑๆง้กน็ๅ็งฐๅทฒๅญๅจ"); | ||
| 27 | - ErrorCode PROPERTY_DELETE_FAIL_VALUE_EXISTS = new ErrorCode(1008003002, "ๅฑๆง้กนไธๅญๅจๅฑๆงๅผ๏ผๆ ๆณๅ ้ค"); | ||
| 28 | - | ||
| 29 | - // ========== ๅๅๅฑๆงๅผ 1008004000 ========== | ||
| 30 | - ErrorCode PROPERTY_VALUE_NOT_EXISTS = new ErrorCode(1008004000, "ๅฑๆงๅผไธๅญๅจ"); | ||
| 31 | - ErrorCode PROPERTY_VALUE_EXISTS = new ErrorCode(1008004001, "ๅฑๆงๅผ็ๅ็งฐๅทฒๅญๅจ"); | ||
| 32 | - | ||
| 33 | - // ========== ๅๅ SPU 1008005000 ========== | ||
| 34 | - ErrorCode SPU_NOT_EXISTS = new ErrorCode(1008005000, "ๅๅ SPU ไธๅญๅจ"); | ||
| 35 | - ErrorCode SPU_SAVE_FAIL_CATEGORY_LEVEL_ERROR = new ErrorCode(1008005001, "ๅๅๅ็ฑปไธๆญฃ็กฎ๏ผๅๅ ๏ผๅฟ ้กปไฝฟ็จ็ฌฌไธ็บง็ๅๅๅ็ฑปไธ"); | ||
| 36 | - ErrorCode SPU_NOT_ENABLE = new ErrorCode(1008005002, "ๅๅ SPU ไธๅคไบไธๆถ็ถๆ"); | ||
| 37 | - | ||
| 38 | - // ========== ๅๅ SKU 1008006000 ========== | ||
| 39 | - ErrorCode SKU_NOT_EXISTS = new ErrorCode(1008006000, "ๅๅ SKU ไธๅญๅจ"); | ||
| 40 | - ErrorCode SKU_PROPERTIES_DUPLICATED = new ErrorCode(1008006001, "ๅๅ SKU ็ๅฑๆง็ปๅๅญๅจ้ๅค"); | ||
| 41 | - ErrorCode SPU_ATTR_NUMBERS_MUST_BE_EQUALS = new ErrorCode(1008006002, "ไธไธช SPU ไธ็ๆฏไธช SKU๏ผๅ ถๅฑๆง้กนๅฟ ้กปไธ่ด"); | ||
| 42 | - ErrorCode SPU_SKU_NOT_DUPLICATE = new ErrorCode(1008006003, "ไธไธช SPU ไธ็ๆฏไธช SKU๏ผๅฟ ้กปไธ้ๅค"); | ||
| 43 | - ErrorCode SKU_STOCK_NOT_ENOUGH = new ErrorCode(1008006004, "ๅๅ SKU ๅบๅญไธ่ถณ"); | ||
| 44 | - | ||
| 45 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/comment/ProductCommentAuditStatusEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.product.enums.comment; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Getter; | ||
| 6 | - | ||
| 7 | -import java.util.Arrays; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅ่ฏ่ฎบ็ๅฎกๆน็ถๆๆไธพ | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@Getter | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public enum ProductCommentAuditStatusEnum implements IntArrayValuable { | ||
| 17 | - | ||
| 18 | - NONE(1, "ๅพ ๅฎกๆ ธ"), | ||
| 19 | - APPROVE(2, "ๅฎกๆน้่ฟ"), | ||
| 20 | - REJECT(2, "ๅฎกๆนไธ้่ฟ"),; | ||
| 21 | - | ||
| 22 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCommentAuditStatusEnum::getStatus).toArray(); | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ๅฎกๆน็ถๆ | ||
| 26 | - */ | ||
| 27 | - private final Integer status; | ||
| 28 | - /** | ||
| 29 | - * ็ถๆๅ | ||
| 30 | - */ | ||
| 31 | - private final String name; | ||
| 32 | - | ||
| 33 | - @Override | ||
| 34 | - public int[] array() { | ||
| 35 | - return ARRAYS; | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/delivery/DeliveryTypeEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.product.enums.delivery; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Getter; | ||
| 6 | - | ||
| 7 | -import java.util.Arrays; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ้ ้ๆนๅผๆไธพ | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@Getter | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public enum DeliveryTypeEnum implements IntArrayValuable { | ||
| 17 | - | ||
| 18 | - // TODO ่่ฟ๏ผ่ฑๆๅ่ฏ๏ผ้่ฆๅๆณไธ๏ผ | ||
| 19 | - EXPRESS(1, "ๅฟซ้ๅ่ดง"), | ||
| 20 | - USER(2, "็จๆท่ชๆ"),; | ||
| 21 | - | ||
| 22 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryTypeEnum::getMode).toArray(); | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ้ ้ๆนๅผ | ||
| 26 | - */ | ||
| 27 | - private final Integer mode; | ||
| 28 | - /** | ||
| 29 | - * ็ถๆๅ | ||
| 30 | - */ | ||
| 31 | - private final String name; | ||
| 32 | - | ||
| 33 | - @Override | ||
| 34 | - public int[] array() { | ||
| 35 | - return ARRAYS; | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/group/ProductGroupStyleEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.product.enums.group; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Getter; | ||
| 6 | - | ||
| 7 | -import java.util.Arrays; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅๅ็ป็ๆ ทๅผๆไธพ | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@Getter | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public enum ProductGroupStyleEnum implements IntArrayValuable { | ||
| 17 | - | ||
| 18 | - ONE(1, "ๆฏๅไธไธช"), | ||
| 19 | - TWO(2, "ๆฏๅไธคไธช"), | ||
| 20 | - THREE(2, "ๆฏๅไธไธช"),; | ||
| 21 | - | ||
| 22 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductGroupStyleEnum::getStyle).toArray(); | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ๅ่กจๆ ทๅผ | ||
| 26 | - */ | ||
| 27 | - private final Integer style; | ||
| 28 | - /** | ||
| 29 | - * ็ถๆๅ | ||
| 30 | - */ | ||
| 31 | - private final String name; | ||
| 32 | - | ||
| 33 | - @Override | ||
| 34 | - public int[] array() { | ||
| 35 | - return ARRAYS; | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuSpecTypeEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.product.enums.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Getter; | ||
| 6 | - | ||
| 7 | -import java.util.Arrays; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅ SPU ่งๆ ผ็ฑปๅ | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@Getter | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public enum ProductSpuSpecTypeEnum implements IntArrayValuable { | ||
| 17 | - | ||
| 18 | - RECYCLE(1, "็ปไธ่งๆ ผ"), | ||
| 19 | - DISABLE(2, "ๅค่งๆ ผ"); | ||
| 20 | - | ||
| 21 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuSpecTypeEnum::getType).toArray(); | ||
| 22 | - | ||
| 23 | - /** | ||
| 24 | - * ่งๆ ผ็ฑปๅ | ||
| 25 | - */ | ||
| 26 | - private final Integer type; | ||
| 27 | - /** | ||
| 28 | - * ่งๆ ผๅ็งฐ | ||
| 29 | - */ | ||
| 30 | - private final String name; | ||
| 31 | - | ||
| 32 | - @Override | ||
| 33 | - public int[] array() { | ||
| 34 | - return ARRAYS; | ||
| 35 | - } | ||
| 36 | - | ||
| 37 | -} |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuStatusEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.product.enums.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||
| 4 | -import lombok.AllArgsConstructor; | ||
| 5 | -import lombok.Getter; | ||
| 6 | - | ||
| 7 | -import java.util.Arrays; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅ SPU ็ถๆ | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@Getter | ||
| 15 | -@AllArgsConstructor | ||
| 16 | -public enum ProductSpuStatusEnum implements IntArrayValuable { | ||
| 17 | - | ||
| 18 | - RECYCLE(-1, "ๅๆถ็ซ"), | ||
| 19 | - DISABLE(0, "ไธๆถ"), | ||
| 20 | - ENABLE(1, "ไธๆถ"),; | ||
| 21 | - | ||
| 22 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuStatusEnum::getStatus).toArray(); | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ็ถๆ | ||
| 26 | - */ | ||
| 27 | - private final Integer status; | ||
| 28 | - /** | ||
| 29 | - * ็ถๆๅ | ||
| 30 | - */ | ||
| 31 | - private final String name; | ||
| 32 | - | ||
| 33 | - @Override | ||
| 34 | - public int[] array() { | ||
| 35 | - return ARRAYS; | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - /** | ||
| 39 | - * ๅคๆญๆฏๅฆๅคไบใไธๆถใ็ถๆ | ||
| 40 | - * | ||
| 41 | - * @param status ็ถๆ | ||
| 42 | - * @return ๆฏๅฆๅคไบใไธๆถใ็ถๆ | ||
| 43 | - */ | ||
| 44 | - public static boolean isEnable(Integer status) { | ||
| 45 | - return ENABLE.getStatus().equals(status); | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | -} |
yudao-module-mall/yudao-module-product-biz/pom.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | - <parent> | ||
| 6 | - <groupId>cn.iocoder.boot</groupId> | ||
| 7 | - <artifactId>yudao-module-mall</artifactId> | ||
| 8 | - <version>${revision}</version> | ||
| 9 | - </parent> | ||
| 10 | - <modelVersion>4.0.0</modelVersion> | ||
| 11 | - <artifactId>yudao-module-product-biz</artifactId> | ||
| 12 | - <packaging>jar</packaging> | ||
| 13 | - | ||
| 14 | - <name>${project.artifactId}</name> | ||
| 15 | - <description> | ||
| 16 | - product ๆจกๅ๏ผไธป่ฆๅฎ็ฐๅๅ็ธๅ ณๅ่ฝ | ||
| 17 | - ไพๅฆ๏ผๅ็ใๅๅๅ็ฑปใspuใsku็ญๅ่ฝใ | ||
| 18 | - </description> | ||
| 19 | - | ||
| 20 | - <dependencies> | ||
| 21 | - <dependency> | ||
| 22 | - <groupId>cn.iocoder.boot</groupId> | ||
| 23 | - <artifactId>yudao-module-product-api</artifactId> | ||
| 24 | - <version>${revision}</version> | ||
| 25 | - </dependency> | ||
| 26 | - | ||
| 27 | - <!-- ไธๅก็ปไปถ --> | ||
| 28 | - <dependency> | ||
| 29 | - <groupId>cn.iocoder.boot</groupId> | ||
| 30 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | ||
| 31 | - </dependency> | ||
| 32 | - | ||
| 33 | - <!-- Web ็ธๅ ณ --> | ||
| 34 | - <dependency> | ||
| 35 | - <groupId>cn.iocoder.boot</groupId> | ||
| 36 | - <artifactId>yudao-spring-boot-starter-web</artifactId> | ||
| 37 | - </dependency> | ||
| 38 | - <dependency> | ||
| 39 | - <groupId>cn.iocoder.boot</groupId> | ||
| 40 | - <artifactId>yudao-spring-boot-starter-security</artifactId> | ||
| 41 | - </dependency> | ||
| 42 | - | ||
| 43 | - <!-- DB ็ธๅ ณ --> | ||
| 44 | - <dependency> | ||
| 45 | - <groupId>cn.iocoder.boot</groupId> | ||
| 46 | - <artifactId>yudao-spring-boot-starter-mybatis</artifactId> | ||
| 47 | - </dependency> | ||
| 48 | - | ||
| 49 | - <!-- Test ๆต่ฏ็ธๅ ณ --> | ||
| 50 | - <dependency> | ||
| 51 | - <groupId>cn.iocoder.boot</groupId> | ||
| 52 | - <artifactId>yudao-spring-boot-starter-test</artifactId> | ||
| 53 | - </dependency> | ||
| 54 | - | ||
| 55 | - <!-- ๅทฅๅ ท็ฑป็ธๅ ณ --> | ||
| 56 | - <dependency> | ||
| 57 | - <groupId>cn.iocoder.boot</groupId> | ||
| 58 | - <artifactId>yudao-spring-boot-starter-excel</artifactId> | ||
| 59 | - </dependency> | ||
| 60 | - </dependencies> | ||
| 61 | - | ||
| 62 | -</project> |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/api/package-info.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api; |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/api/property/ProductPropertyValueApiImpl.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.api.property.dto.ProductPropertyValueDetailRespDTO; | ||
| 4 | -import cn.iocoder.yudao.module.product.convert.propertyvalue.ProductPropertyValueConvert; | ||
| 5 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService; | ||
| 6 | -import org.springframework.stereotype.Service; | ||
| 7 | -import org.springframework.validation.annotation.Validated; | ||
| 8 | - | ||
| 9 | -import javax.annotation.Resource; | ||
| 10 | -import java.util.Collection; | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * ๅๅๅฑๆงๅผ API ๅฎ็ฐ็ฑป | ||
| 15 | - * | ||
| 16 | - * @author ่้ๆบ็ | ||
| 17 | - */ | ||
| 18 | -@Service | ||
| 19 | -@Validated | ||
| 20 | -public class ProductPropertyValueApiImpl implements ProductPropertyValueApi { | ||
| 21 | - | ||
| 22 | - @Resource | ||
| 23 | - private ProductPropertyValueService productPropertyValueService; | ||
| 24 | - | ||
| 25 | - @Override | ||
| 26 | - public List<ProductPropertyValueDetailRespDTO> getPropertyValueDetailList(Collection<Long> ids) { | ||
| 27 | - return ProductPropertyValueConvert.INSTANCE.convertList02( | ||
| 28 | - productPropertyValueService.getPropertyValueDetailList(ids)); | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/api/sku/ProductSkuApiImpl.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.sku; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO; | ||
| 5 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuUpdateStockReqDTO; | ||
| 6 | -import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 8 | -import cn.iocoder.yudao.module.product.service.sku.ProductSkuService; | ||
| 9 | -import org.springframework.stereotype.Service; | ||
| 10 | -import org.springframework.validation.annotation.Validated; | ||
| 11 | - | ||
| 12 | -import javax.annotation.Resource; | ||
| 13 | -import java.util.Collection; | ||
| 14 | -import java.util.Collections; | ||
| 15 | -import java.util.List; | ||
| 16 | - | ||
| 17 | -/** | ||
| 18 | - * TODO LeeYan9: ็ฑปๆณจ้; | ||
| 19 | - * @author LeeYan9 | ||
| 20 | - * @since 2022-09-06 | ||
| 21 | - */ | ||
| 22 | -@Service | ||
| 23 | -@Validated | ||
| 24 | -public class ProductSkuApiImpl implements ProductSkuApi { | ||
| 25 | - | ||
| 26 | - @Resource | ||
| 27 | - private ProductSkuService productSkuService; | ||
| 28 | - | ||
| 29 | - @Override | ||
| 30 | - public ProductSkuRespDTO getSku(Long id) { | ||
| 31 | - // TODO TODO LeeYan9: ้่ฆๅฎ็ฐ | ||
| 32 | - return null; | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | - @Override | ||
| 36 | - public List<ProductSkuRespDTO> getSkuList(Collection<Long> ids) { | ||
| 37 | - if (CollUtil.isEmpty(ids)) { | ||
| 38 | - return Collections.emptyList(); | ||
| 39 | - } | ||
| 40 | - List<ProductSkuDO> skus = productSkuService.getSkuList(ids); | ||
| 41 | - return ProductSkuConvert.INSTANCE.convertList04(skus); | ||
| 42 | - } | ||
| 43 | - | ||
| 44 | - @Override | ||
| 45 | - public void updateSkuStock(ProductSkuUpdateStockReqDTO updateStockReqDTO) { | ||
| 46 | - productSkuService.updateSkuStock(updateStockReqDTO); | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/api/spu/ProductSpuApiImpl.java deleted
| 1 | -package cn.iocoder.yudao.module.product.api.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 4 | -import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO; | ||
| 5 | -import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; | ||
| 6 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.mysql.spu.ProductSpuMapper; | ||
| 8 | -import org.springframework.stereotype.Service; | ||
| 9 | -import org.springframework.validation.annotation.Validated; | ||
| 10 | - | ||
| 11 | -import javax.annotation.Resource; | ||
| 12 | -import java.util.Collection; | ||
| 13 | -import java.util.Collections; | ||
| 14 | -import java.util.List; | ||
| 15 | - | ||
| 16 | -/** | ||
| 17 | - * TODO LeeYan9: ็ฑปๆณจ้; | ||
| 18 | - * | ||
| 19 | - * @author LeeYan9 | ||
| 20 | - * @since 2022-09-06 | ||
| 21 | - */ | ||
| 22 | -@Service | ||
| 23 | -@Validated | ||
| 24 | -public class ProductSpuApiImpl implements ProductSpuApi { | ||
| 25 | - | ||
| 26 | - @Resource | ||
| 27 | - private ProductSpuMapper productSpuMapper; | ||
| 28 | - | ||
| 29 | - @Override | ||
| 30 | - public List<ProductSpuRespDTO> getSpuList(Collection<Long> spuIds) { | ||
| 31 | - // TODO TODO LeeYan9: AllEmpty? | ||
| 32 | - if (CollectionUtils.isAnyEmpty(spuIds)) { | ||
| 33 | - return Collections.emptyList(); | ||
| 34 | - } | ||
| 35 | - List<ProductSpuDO> productSpuDOList = productSpuMapper.selectBatchIds(spuIds); | ||
| 36 | - return ProductSpuConvert.INSTANCE.convertList2(productSpuDOList); | ||
| 37 | - } | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/ProductBrandController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.brand.vo.*; | ||
| 6 | -import cn.iocoder.yudao.module.product.convert.brand.ProductBrandConvert; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; | ||
| 8 | -import cn.iocoder.yudao.module.product.service.brand.ProductBrandService; | ||
| 9 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 10 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 11 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 12 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 13 | -import org.springframework.validation.annotation.Validated; | ||
| 14 | -import org.springframework.web.bind.annotation.*; | ||
| 15 | - | ||
| 16 | -import javax.annotation.Resource; | ||
| 17 | -import javax.validation.Valid; | ||
| 18 | -import java.util.Comparator; | ||
| 19 | -import java.util.List; | ||
| 20 | - | ||
| 21 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 22 | - | ||
| 23 | -@Tag(name = "็ฎก็ๅๅฐ - ๅๅๅ็") | ||
| 24 | -@RestController | ||
| 25 | -@RequestMapping("/product/brand") | ||
| 26 | -@Validated | ||
| 27 | -public class ProductBrandController { | ||
| 28 | - | ||
| 29 | - @Resource | ||
| 30 | - private ProductBrandService brandService; | ||
| 31 | - | ||
| 32 | - @PostMapping("/create") | ||
| 33 | - @Operation(summary = "ๅๅปบๅ็") | ||
| 34 | - @PreAuthorize("@ss.hasPermission('product:brand:create')") | ||
| 35 | - public CommonResult<Long> createBrand(@Valid @RequestBody ProductBrandCreateReqVO createReqVO) { | ||
| 36 | - return success(brandService.createBrand(createReqVO)); | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - @PutMapping("/update") | ||
| 40 | - @Operation(summary = "ๆดๆฐๅ็") | ||
| 41 | - @PreAuthorize("@ss.hasPermission('product:brand:update')") | ||
| 42 | - public CommonResult<Boolean> updateBrand(@Valid @RequestBody ProductBrandUpdateReqVO updateReqVO) { | ||
| 43 | - brandService.updateBrand(updateReqVO); | ||
| 44 | - return success(true); | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | - @DeleteMapping("/delete") | ||
| 48 | - @Operation(summary = "ๅ ้คๅ็") | ||
| 49 | - @Parameter(name = "id", description = "็ผๅท", required = true) | ||
| 50 | - @PreAuthorize("@ss.hasPermission('product:brand:delete')") | ||
| 51 | - public CommonResult<Boolean> deleteBrand(@RequestParam("id") Long id) { | ||
| 52 | - brandService.deleteBrand(id); | ||
| 53 | - return success(true); | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - @GetMapping("/get") | ||
| 57 | - @Operation(summary = "่ทๅพๅ็") | ||
| 58 | - @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | ||
| 59 | - @PreAuthorize("@ss.hasPermission('product:brand:query')") | ||
| 60 | - public CommonResult<ProductBrandRespVO> getBrand(@RequestParam("id") Long id) { | ||
| 61 | - ProductBrandDO brand = brandService.getBrand(id); | ||
| 62 | - return success(ProductBrandConvert.INSTANCE.convert(brand)); | ||
| 63 | - } | ||
| 64 | - | ||
| 65 | - @GetMapping("/page") | ||
| 66 | - @Operation(summary = "่ทๅพๅ็ๅ้กต") | ||
| 67 | - @PreAuthorize("@ss.hasPermission('product:brand:query')") | ||
| 68 | - public CommonResult<PageResult<ProductBrandRespVO>> getBrandPage(@Valid ProductBrandPageReqVO pageVO) { | ||
| 69 | - PageResult<ProductBrandDO> pageResult = brandService.getBrandPage(pageVO); | ||
| 70 | - return success(ProductBrandConvert.INSTANCE.convertPage(pageResult)); | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - @GetMapping("/list") | ||
| 74 | - @Operation(summary = "่ทๅพๅ็ๅ่กจ") | ||
| 75 | - @PreAuthorize("@ss.hasPermission('product:brand:query')") | ||
| 76 | - public CommonResult<List<ProductBrandRespVO>> getBrandList(@Valid ProductBrandListReqVO listVO) { | ||
| 77 | - List<ProductBrandDO> list = brandService.getBrandList(listVO); | ||
| 78 | - list.sort(Comparator.comparing(ProductBrandDO::getSort)); | ||
| 79 | - return success(ProductBrandConvert.INSTANCE.convertList(list)); | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandBaseVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.Data; | ||
| 4 | - | ||
| 5 | -import javax.validation.constraints.NotNull; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | -* ๅๅๅ็ Base VO๏ผๆไพ็ปๆทปๅ ใไฟฎๆนใ่ฏฆ็ป็ๅญ VO ไฝฟ็จ | ||
| 9 | -* ๅฆๆๅญ VO ๅญๅจๅทฎๅผ็ๅญๆฎต๏ผ่ฏทไธ่ฆๆทปๅ ๅฐ่ฟ้๏ผๅฝฑๅ Swagger ๆๆกฃ็ๆ | ||
| 10 | -*/ | ||
| 11 | -@Data | ||
| 12 | -public class ProductBrandBaseVO { | ||
| 13 | - | ||
| 14 | - @Schema(description = "ๅ็ๅ็งฐ", required = true, example = "่้") | ||
| 15 | - @NotNull(message = "ๅ็ๅ็งฐไธ่ฝไธบ็ฉบ") | ||
| 16 | - private String name; | ||
| 17 | - | ||
| 18 | - @Schema(description = "ๅ็ๅพ็", required = true) | ||
| 19 | - @NotNull(message = "ๅ็ๅพ็ไธ่ฝไธบ็ฉบ") | ||
| 20 | - private String picUrl; | ||
| 21 | - | ||
| 22 | - @Schema(description = "ๅ็ๆๅบ", required = true, example = "1") | ||
| 23 | - @NotNull(message = "ๅ็ๆๅบไธ่ฝไธบ็ฉบ") | ||
| 24 | - private Integer sort; | ||
| 25 | - | ||
| 26 | - @Schema(description = "ๅ็ๆ่ฟฐ", example = "ๆ่ฟฐ") | ||
| 27 | - private String description; | ||
| 28 | - | ||
| 29 | - @Schema(description = "็ถๆ", required = true, example = "0") | ||
| 30 | - @NotNull(message = "็ถๆไธ่ฝไธบ็ฉบ") | ||
| 31 | - private Integer status; | ||
| 32 | - | ||
| 33 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandCreateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.*; | ||
| 4 | - | ||
| 5 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ๅๅปบ Request VO") | ||
| 6 | -@Data | ||
| 7 | -@EqualsAndHashCode(callSuper = true) | ||
| 8 | -@ToString(callSuper = true) | ||
| 9 | -public class ProductBrandCreateReqVO extends ProductBrandBaseVO { | ||
| 10 | - | ||
| 11 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandListReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ๅ้กต Request VO") | ||
| 7 | -@Data | ||
| 8 | -public class ProductBrandListReqVO { | ||
| 9 | - | ||
| 10 | - @Schema(description = "ๅ็ๅ็งฐ", example = "่้") | ||
| 11 | - private String name; | ||
| 12 | - | ||
| 13 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandPageReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.EqualsAndHashCode; | ||
| 7 | -import lombok.ToString; | ||
| 8 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | - | ||
| 10 | -import java.time.LocalDateTime; | ||
| 11 | - | ||
| 12 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | ||
| 13 | - | ||
| 14 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ๅ้กต Request VO") | ||
| 15 | -@Data | ||
| 16 | -@EqualsAndHashCode(callSuper = true) | ||
| 17 | -@ToString(callSuper = true) | ||
| 18 | -public class ProductBrandPageReqVO extends PageParam { | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๅ็ๅ็งฐ", example = "่้") | ||
| 21 | - private String name; | ||
| 22 | - | ||
| 23 | - @Schema(description = "็ถๆ-ๅ่ CommonStatusEnum ๆไธพ", example = "0") | ||
| 24 | - private Integer status; | ||
| 25 | - | ||
| 26 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 27 | - @Schema(description = "ๅๅปบๆถ้ด") | ||
| 28 | - private LocalDateTime[] createTime; | ||
| 29 | - | ||
| 30 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็ฎก็ๅๅฐ - ๅ็ Response VO") | ||
| 11 | -@Data | ||
| 12 | -@EqualsAndHashCode(callSuper = true) | ||
| 13 | -@ToString(callSuper = true) | ||
| 14 | -public class ProductBrandRespVO extends ProductBrandBaseVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "ๅ็็ผๅท", required = true, example = "1") | ||
| 17 | - private Long id; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅๅปบๆถ้ด", required = true) | ||
| 20 | - private LocalDateTime createTime; | ||
| 21 | - | ||
| 22 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandUpdateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.brand.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.*; | ||
| 4 | -import javax.validation.constraints.*; | ||
| 5 | - | ||
| 6 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ๆดๆฐ Request VO") | ||
| 7 | -@Data | ||
| 8 | -@EqualsAndHashCode(callSuper = true) | ||
| 9 | -@ToString(callSuper = true) | ||
| 10 | -public class ProductBrandUpdateReqVO extends ProductBrandBaseVO { | ||
| 11 | - | ||
| 12 | - @Schema(description = "ๅ็็ผๅท", required = true, example = "1") | ||
| 13 | - @NotNull(message = "ๅ็็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 14 | - private Long id; | ||
| 15 | - | ||
| 16 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/ProductCategoryController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.category; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryRespVO; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryListReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryCreateReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryUpdateReqVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.convert.category.ProductCategoryConvert; | ||
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; | ||
| 10 | -import cn.iocoder.yudao.module.product.service.category.ProductCategoryService; | ||
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 12 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 13 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 14 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 15 | -import org.springframework.validation.annotation.Validated; | ||
| 16 | -import org.springframework.web.bind.annotation.*; | ||
| 17 | - | ||
| 18 | -import javax.annotation.Resource; | ||
| 19 | -import javax.validation.Valid; | ||
| 20 | -import java.util.Comparator; | ||
| 21 | -import java.util.List; | ||
| 22 | - | ||
| 23 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 24 | - | ||
| 25 | -@Tag(name = "็ฎก็ๅๅฐ - ๅๅๅ็ฑป") | ||
| 26 | -@RestController | ||
| 27 | -@RequestMapping("/product/category") | ||
| 28 | -@Validated | ||
| 29 | -public class ProductCategoryController { | ||
| 30 | - | ||
| 31 | - @Resource | ||
| 32 | - private ProductCategoryService categoryService; | ||
| 33 | - | ||
| 34 | - @PostMapping("/create") | ||
| 35 | - @Operation(summary = "ๅๅปบๅๅๅ็ฑป") | ||
| 36 | - @PreAuthorize("@ss.hasPermission('product:category:create')") | ||
| 37 | - public CommonResult<Long> createCategory(@Valid @RequestBody ProductCategoryCreateReqVO createReqVO) { | ||
| 38 | - return success(categoryService.createCategory(createReqVO)); | ||
| 39 | - } | ||
| 40 | - | ||
| 41 | - @PutMapping("/update") | ||
| 42 | - @Operation(summary = "ๆดๆฐๅๅๅ็ฑป") | ||
| 43 | - @PreAuthorize("@ss.hasPermission('product:category:update')") | ||
| 44 | - public CommonResult<Boolean> updateCategory(@Valid @RequestBody ProductCategoryUpdateReqVO updateReqVO) { | ||
| 45 | - categoryService.updateCategory(updateReqVO); | ||
| 46 | - return success(true); | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | - @DeleteMapping("/delete") | ||
| 50 | - @Operation(summary = "ๅ ้คๅๅๅ็ฑป") | ||
| 51 | - @Parameter(name = "id", description = "็ผๅท", required = true) | ||
| 52 | - @PreAuthorize("@ss.hasPermission('product:category:delete')") | ||
| 53 | - public CommonResult<Boolean> deleteCategory(@RequestParam("id") Long id) { | ||
| 54 | - categoryService.deleteCategory(id); | ||
| 55 | - return success(true); | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - @GetMapping("/get") | ||
| 59 | - @Operation(summary = "่ทๅพๅๅๅ็ฑป") | ||
| 60 | - @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | ||
| 61 | - @PreAuthorize("@ss.hasPermission('product:category:query')") | ||
| 62 | - public CommonResult<ProductCategoryRespVO> getCategory(@RequestParam("id") Long id) { | ||
| 63 | - ProductCategoryDO category = categoryService.getCategory(id); | ||
| 64 | - return success(ProductCategoryConvert.INSTANCE.convert(category)); | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - @GetMapping("/list") | ||
| 68 | - @Operation(summary = "่ทๅพๅๅๅ็ฑปๅ่กจ") | ||
| 69 | - @PreAuthorize("@ss.hasPermission('product:category:query')") | ||
| 70 | - public CommonResult<List<ProductCategoryRespVO>> getCategoryList(@Valid ProductCategoryListReqVO treeListReqVO) { | ||
| 71 | - List<ProductCategoryDO> list = categoryService.getEnableCategoryList(treeListReqVO); | ||
| 72 | - list.sort(Comparator.comparing(ProductCategoryDO::getSort)); | ||
| 73 | - return success(ProductCategoryConvert.INSTANCE.convertList(list)); | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.category.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.Data; | ||
| 4 | - | ||
| 5 | -import javax.validation.constraints.NotBlank; | ||
| 6 | -import javax.validation.constraints.NotNull; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | -* ๅๅๅ็ฑป Base VO๏ผๆไพ็ปๆทปๅ ใไฟฎๆนใ่ฏฆ็ป็ๅญ VO ไฝฟ็จ | ||
| 10 | -* ๅฆๆๅญ VO ๅญๅจๅทฎๅผ็ๅญๆฎต๏ผ่ฏทไธ่ฆๆทปๅ ๅฐ่ฟ้๏ผๅฝฑๅ Swagger ๆๆกฃ็ๆ | ||
| 11 | -*/ | ||
| 12 | -@Data | ||
| 13 | -public class ProductCategoryBaseVO { | ||
| 14 | - | ||
| 15 | - @Schema(description = "็ถๅ็ฑป็ผๅท", required = true, example = "1") | ||
| 16 | - @NotNull(message = "็ถๅ็ฑป็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 17 | - private Long parentId; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅ็ฑปๅ็งฐ", required = true, example = "ๅๅ ฌๆๅ ท") | ||
| 20 | - @NotBlank(message = "ๅ็ฑปๅ็งฐไธ่ฝไธบ็ฉบ") | ||
| 21 | - private String name; | ||
| 22 | - | ||
| 23 | - @Schema(description = "ๅ็ฑปๅพ็", required = true) | ||
| 24 | - @NotBlank(message = "ๅ็ฑปๅพ็ไธ่ฝไธบ็ฉบ") | ||
| 25 | - private String picUrl; | ||
| 26 | - | ||
| 27 | - @Schema(description = "ๅ็ฑปๆๅบ", required = true, example = "1") | ||
| 28 | - private Integer sort; | ||
| 29 | - | ||
| 30 | - @Schema(description = "ๅ็ฑปๆ่ฟฐ", required = true, example = "ๆ่ฟฐ") | ||
| 31 | - private String description; | ||
| 32 | - | ||
| 33 | - @Schema(description = "ๅผๅฏ็ถๆ", required = true, example = "0") | ||
| 34 | - @NotNull(message = "ๅผๅฏ็ถๆไธ่ฝไธบ็ฉบ") | ||
| 35 | - private Integer status; | ||
| 36 | - | ||
| 37 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.category.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.*; | ||
| 4 | - | ||
| 5 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ฑปๅๅปบ Request VO") | ||
| 6 | -@Data | ||
| 7 | -@EqualsAndHashCode(callSuper = true) | ||
| 8 | -@ToString(callSuper = true) | ||
| 9 | -public class ProductCategoryCreateReqVO extends ProductCategoryBaseVO { | ||
| 10 | - | ||
| 11 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryListReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.category.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ฑปๅ่กจๆฅ่ฏข Request VO") | ||
| 7 | -@Data | ||
| 8 | -public class ProductCategoryListReqVO { | ||
| 9 | - | ||
| 10 | - @Schema(description = "ๅ็ฑปๅ็งฐ", example = "ๅๅ ฌๆๅ ท") | ||
| 11 | - private String name; | ||
| 12 | - | ||
| 13 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.category.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.*; | ||
| 4 | - | ||
| 5 | -import java.time.LocalDateTime; | ||
| 6 | - | ||
| 7 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ฑป Response VO") | ||
| 8 | -@Data | ||
| 9 | -@EqualsAndHashCode(callSuper = true) | ||
| 10 | -@ToString(callSuper = true) | ||
| 11 | -public class ProductCategoryRespVO extends ProductCategoryBaseVO { | ||
| 12 | - | ||
| 13 | - @Schema(description = "ๅ็ฑป็ผๅท", required = true, example = "2") | ||
| 14 | - private Long id; | ||
| 15 | - | ||
| 16 | - @Schema(description = "ๅๅปบๆถ้ด", required = true) | ||
| 17 | - private LocalDateTime createTime; | ||
| 18 | - | ||
| 19 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.category.vo; | ||
| 2 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | -import lombok.*; | ||
| 4 | -import javax.validation.constraints.*; | ||
| 5 | - | ||
| 6 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅ็ฑปๆดๆฐ Request VO") | ||
| 7 | -@Data | ||
| 8 | -@EqualsAndHashCode(callSuper = true) | ||
| 9 | -@ToString(callSuper = true) | ||
| 10 | -public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO { | ||
| 11 | - | ||
| 12 | - @Schema(description = "ๅ็ฑป็ผๅท", required = true, example = "2") | ||
| 13 | - @NotNull(message = "ๅ็ฑป็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 14 | - private Long id; | ||
| 15 | - | ||
| 16 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 5 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.*; | ||
| 7 | -import cn.iocoder.yudao.module.product.convert.property.ProductPropertyConvert; | ||
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; | ||
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; | ||
| 10 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyService; | ||
| 11 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService; | ||
| 12 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 13 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 14 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 15 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 16 | -import org.springframework.validation.annotation.Validated; | ||
| 17 | -import org.springframework.web.bind.annotation.*; | ||
| 18 | - | ||
| 19 | -import javax.annotation.Resource; | ||
| 20 | -import javax.validation.Valid; | ||
| 21 | -import java.util.Collections; | ||
| 22 | -import java.util.List; | ||
| 23 | - | ||
| 24 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 25 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | ||
| 26 | - | ||
| 27 | -@Tag(name = "็ฎก็ๅๅฐ - ๅๅๅฑๆง้กน") | ||
| 28 | -@RestController | ||
| 29 | -@RequestMapping("/product/property") | ||
| 30 | -@Validated | ||
| 31 | -public class ProductPropertyController { | ||
| 32 | - | ||
| 33 | - @Resource | ||
| 34 | - private ProductPropertyService productPropertyService; | ||
| 35 | - @Resource | ||
| 36 | - private ProductPropertyValueService productPropertyValueService; | ||
| 37 | - | ||
| 38 | - @PostMapping("/create") | ||
| 39 | - @Operation(summary = "ๅๅปบๅฑๆง้กน") | ||
| 40 | - @PreAuthorize("@ss.hasPermission('product:property:create')") | ||
| 41 | - public CommonResult<Long> createProperty(@Valid @RequestBody ProductPropertyCreateReqVO createReqVO) { | ||
| 42 | - return success(productPropertyService.createProperty(createReqVO)); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - @PutMapping("/update") | ||
| 46 | - @Operation(summary = "ๆดๆฐๅฑๆง้กน") | ||
| 47 | - @PreAuthorize("@ss.hasPermission('product:property:update')") | ||
| 48 | - public CommonResult<Boolean> updateProperty(@Valid @RequestBody ProductPropertyUpdateReqVO updateReqVO) { | ||
| 49 | - productPropertyService.updateProperty(updateReqVO); | ||
| 50 | - return success(true); | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - @DeleteMapping("/delete") | ||
| 54 | - @Operation(summary = "ๅ ้คๅฑๆง้กน") | ||
| 55 | - @Parameter(name = "id", description = "็ผๅท", required = true) | ||
| 56 | - @PreAuthorize("@ss.hasPermission('product:property:delete')") | ||
| 57 | - public CommonResult<Boolean> deleteProperty(@RequestParam("id") Long id) { | ||
| 58 | - productPropertyService.deleteProperty(id); | ||
| 59 | - return success(true); | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - @GetMapping("/get") | ||
| 63 | - @Operation(summary = "่ทๅพๅฑๆง้กน") | ||
| 64 | - @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | ||
| 65 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | ||
| 66 | - public CommonResult<ProductPropertyRespVO> getProperty(@RequestParam("id") Long id) { | ||
| 67 | - return success(ProductPropertyConvert.INSTANCE.convert(productPropertyService.getProperty(id))); | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - @GetMapping("/list") | ||
| 71 | - @Operation(summary = "่ทๅพๅฑๆง้กนๅ่กจ") | ||
| 72 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | ||
| 73 | - public CommonResult<List<ProductPropertyRespVO>> getPropertyList(@Valid ProductPropertyListReqVO listReqVO) { | ||
| 74 | - return success(ProductPropertyConvert.INSTANCE.convertList(productPropertyService.getPropertyList(listReqVO))); | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - @GetMapping("/page") | ||
| 78 | - @Operation(summary = "่ทๅพๅฑๆง้กนๅ้กต") | ||
| 79 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | ||
| 80 | - public CommonResult<PageResult<ProductPropertyRespVO>> getPropertyPage(@Valid ProductPropertyPageReqVO pageVO) { | ||
| 81 | - return success(ProductPropertyConvert.INSTANCE.convertPage(productPropertyService.getPropertyPage(pageVO))); | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | - @GetMapping("/get-value-list") | ||
| 85 | - @Operation(summary = "่ทๅพๅฑๆง้กนๅ่กจ") | ||
| 86 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | ||
| 87 | - public CommonResult<List<ProductPropertyAndValueRespVO>> getPropertyAndValueList(@Valid ProductPropertyListReqVO listReqVO) { | ||
| 88 | - // ๆฅ่ฏขๅฑๆง้กน | ||
| 89 | - List<ProductPropertyDO> keys = productPropertyService.getPropertyList(listReqVO); | ||
| 90 | - if (CollUtil.isEmpty(keys)) { | ||
| 91 | - return success(Collections.emptyList()); | ||
| 92 | - } | ||
| 93 | - // ๆฅ่ฏขๅฑๆงๅผ | ||
| 94 | - List<ProductPropertyValueDO> values = productPropertyValueService.getPropertyValueListByPropertyId( | ||
| 95 | - convertSet(keys, ProductPropertyDO::getId)); | ||
| 96 | - return success(ProductPropertyConvert.INSTANCE.convertList(keys, values)); | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyValueController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValuePageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueUpdateReqVO; | ||
| 9 | -import cn.iocoder.yudao.module.product.convert.propertyvalue.ProductPropertyValueConvert; | ||
| 10 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService; | ||
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 12 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 13 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 14 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 15 | -import org.springframework.validation.annotation.Validated; | ||
| 16 | -import org.springframework.web.bind.annotation.*; | ||
| 17 | - | ||
| 18 | -import javax.annotation.Resource; | ||
| 19 | -import javax.validation.Valid; | ||
| 20 | - | ||
| 21 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 22 | - | ||
| 23 | -@Tag(name = "็ฎก็ๅๅฐ - ๅๅๅฑๆงๅผ") | ||
| 24 | -@RestController | ||
| 25 | -@RequestMapping("/product/property/value") | ||
| 26 | -@Validated | ||
| 27 | -public class ProductPropertyValueController { | ||
| 28 | - | ||
| 29 | - @Resource | ||
| 30 | - private ProductPropertyValueService productPropertyValueService; | ||
| 31 | - | ||
| 32 | - @PostMapping("/create") | ||
| 33 | - @Operation(summary = "ๅๅปบๅฑๆงๅผ") | ||
| 34 | - @PreAuthorize("@ss.hasPermission('product:property:create')") | ||
| 35 | - public CommonResult<Long> createProperty(@Valid @RequestBody ProductPropertyValueCreateReqVO createReqVO) { | ||
| 36 | - return success(productPropertyValueService.createPropertyValue(createReqVO)); | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - @PutMapping("/update") | ||
| 40 | - @Operation(summary = "ๆดๆฐๅฑๆงๅผ") | ||
| 41 | - @PreAuthorize("@ss.hasPermission('product:property:update')") | ||
| 42 | - public CommonResult<Boolean> updateProperty(@Valid @RequestBody ProductPropertyValueUpdateReqVO updateReqVO) { | ||
| 43 | - productPropertyValueService.updatePropertyValue(updateReqVO); | ||
| 44 | - return success(true); | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | - @DeleteMapping("/delete") | ||
| 48 | - @Operation(summary = "ๅ ้คๅฑๆงๅผ") | ||
| 49 | - @Parameter(name = "id", description = "็ผๅท", required = true) | ||
| 50 | - @PreAuthorize("@ss.hasPermission('product:property:delete')") | ||
| 51 | - public CommonResult<Boolean> deleteProperty(@RequestParam("id") Long id) { | ||
| 52 | - productPropertyValueService.deletePropertyValue(id); | ||
| 53 | - return success(true); | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - @GetMapping("/get") | ||
| 57 | - @Operation(summary = "่ทๅพๅฑๆงๅผ") | ||
| 58 | - @Parameter(name = "id", description = "็ผๅท", required = true, example = "1024") | ||
| 59 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | ||
| 60 | - public CommonResult<ProductPropertyValueRespVO> getProperty(@RequestParam("id") Long id) { | ||
| 61 | - return success(ProductPropertyValueConvert.INSTANCE.convert(productPropertyValueService.getPropertyValue(id))); | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - @GetMapping("/page") | ||
| 65 | - @Operation(summary = "่ทๅพๅฑๆงๅผๅ้กต") | ||
| 66 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | ||
| 67 | - public CommonResult<PageResult<ProductPropertyValueRespVO>> getPropertyValuePage(@Valid ProductPropertyValuePageReqVO pageVO) { | ||
| 68 | - return success(ProductPropertyValueConvert.INSTANCE.convertPage(productPropertyValueService.getPropertyValuePage(pageVO))); | ||
| 69 | - } | ||
| 70 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyViewRespVO.java deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyAndValueRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -import java.util.List; | ||
| 7 | - | ||
| 8 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅฑๆง้กน + ๅฑๆงๅผ Response VO") | ||
| 9 | -@Data | ||
| 10 | -public class ProductPropertyAndValueRespVO { | ||
| 11 | - | ||
| 12 | - @ApiModelProperty(value = "ๅฑๆง้กน็็ผๅท", required = true, example = "1024") | ||
| 13 | - private Long id; | ||
| 14 | - | ||
| 15 | - @ApiModelProperty(value = "ๅฑๆง้กน็ๅ็งฐ", required = true, example = "้ข่ฒ") | ||
| 16 | - private String name; | ||
| 17 | - | ||
| 18 | - /** | ||
| 19 | - * ๅฑๆงๅผ็้ๅ | ||
| 20 | - */ | ||
| 21 | - private List<Value> values; | ||
| 22 | - | ||
| 23 | - @ApiModel("็ฎก็ๅๅฐ - ๅฑๆงๅผ็็ฎๅ Response VO") | ||
| 24 | - @Data | ||
| 25 | - public static class Value { | ||
| 26 | - | ||
| 27 | - @Schema(description = "ๅฑๆงๅผ็็ผๅท", required = true, example = "2048") | ||
| 28 | - private Long id; | ||
| 29 | - | ||
| 30 | - @Schema(description = "ๅฑๆงๅผ็ๅ็งฐ", required = true, example = "็บข่ฒ") | ||
| 31 | - private String name; | ||
| 32 | - | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyBaseVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -import javax.validation.constraints.NotBlank; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * ๅๅๅฑๆง้กน Base VO๏ผๆไพ็ปๆทปๅ ใไฟฎๆนใ่ฏฆ็ป็ๅญ VO ไฝฟ็จ | ||
| 10 | - * ๅฆๆๅญ VO ๅญๅจๅทฎๅผ็ๅญๆฎต๏ผ่ฏทไธ่ฆๆทปๅ ๅฐ่ฟ้๏ผๅฝฑๅ Swagger ๆๆกฃ็ๆ | ||
| 11 | - */ | ||
| 12 | -@Data | ||
| 13 | -public class ProductPropertyBaseVO { | ||
| 14 | - | ||
| 15 | - @Schema(description = "ๅ็งฐ", required = true, example = "้ข่ฒ") | ||
| 16 | - @NotBlank(message = "ๅ็งฐไธ่ฝไธบ็ฉบ") | ||
| 17 | - private String name; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅคๆณจ", example = "้ข่ฒ") | ||
| 20 | - private String remark; | ||
| 21 | - | ||
| 22 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyCreateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -@Schema(description = "็ฎก็ๅๅฐ - ๅฑๆง้กนๅๅปบ Request VO") | ||
| 9 | -@Data | ||
| 10 | -@EqualsAndHashCode(callSuper = true) | ||
| 11 | -@ToString(callSuper = true) | ||
| 12 | -public class ProductPropertyCreateReqVO extends ProductPropertyBaseVO { | ||
| 13 | - | ||
| 14 | - | ||
| 15 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyListReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.ToString; | ||
| 6 | - | ||
| 7 | -@Schema(description = "็ฎก็ๅๅฐ - ๅฑๆง้กน List Request VO") | ||
| 8 | -@Data | ||
| 9 | -@ToString(callSuper = true) | ||
| 10 | -public class ProductPropertyListReqVO { | ||
| 11 | - | ||
| 12 | - @Schema(description = "ๅ็งฐ", example = "้ข่ฒ") | ||
| 13 | - private String name; | ||
| 14 | - | ||
| 15 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyPageReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.EqualsAndHashCode; | ||
| 7 | -import lombok.ToString; | ||
| 8 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | - | ||
| 10 | -import java.time.LocalDateTime; | ||
| 11 | - | ||
| 12 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | ||
| 13 | - | ||
| 14 | -@Schema(description = "็ฎก็ๅๅฐ - ๅฑๆง้กน Request VO") | ||
| 15 | -@Data | ||
| 16 | -@EqualsAndHashCode(callSuper = true) | ||
| 17 | -@ToString(callSuper = true) | ||
| 18 | -public class ProductPropertyPageReqVO extends PageParam { | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๅ็งฐ", example = "้ข่ฒ") | ||
| 21 | - private String name; | ||
| 22 | - | ||
| 23 | - @Schema(description = "็ถๆ-ๅ่ง CommonStatusEnum ๆไธพ", required = true, example = "1") | ||
| 24 | - private Integer status; | ||
| 25 | - | ||
| 26 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 27 | - @Schema(description = "ๅๅปบๆถ้ด") | ||
| 28 | - private LocalDateTime[] createTime; | ||
| 29 | - | ||
| 30 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็ฎก็ๅๅฐ - ๅฑๆง้กน Response VO") | ||
| 11 | -@Data | ||
| 12 | -@EqualsAndHashCode(callSuper = true) | ||
| 13 | -@ToString(callSuper = true) | ||
| 14 | -public class ProductPropertyRespVO extends ProductPropertyBaseVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "็ผๅท", required = true, example = "1024") | ||
| 17 | - private Long id; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅๅปบๆถ้ด", required = true) | ||
| 20 | - private LocalDateTime createTime; | ||
| 21 | - | ||
| 22 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyUpdateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import javax.validation.constraints.NotNull; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็ฎก็ๅๅฐ - ๅฑๆง้กนๆดๆฐ Request VO") | ||
| 11 | -@Data | ||
| 12 | -@EqualsAndHashCode(callSuper = true) | ||
| 13 | -@ToString(callSuper = true) | ||
| 14 | -public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "ไธป้ฎ", required = true, example = "1") | ||
| 17 | - @NotNull(message = "ไธป้ฎไธ่ฝไธบ็ฉบ") | ||
| 18 | - private Long id; | ||
| 19 | - | ||
| 20 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueBaseVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -import javax.validation.constraints.NotEmpty; | ||
| 7 | -import javax.validation.constraints.NotNull; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | -* ๅฑๆงๅผ Base VO๏ผๆไพ็ปๆทปๅ ใไฟฎๆนใ่ฏฆ็ป็ๅญ VO ไฝฟ็จ | ||
| 11 | -* ๅฆๆๅญ VO ๅญๅจๅทฎๅผ็ๅญๆฎต๏ผ่ฏทไธ่ฆๆทปๅ ๅฐ่ฟ้๏ผๅฝฑๅ Swagger ๆๆกฃ็ๆ | ||
| 12 | -*/ | ||
| 13 | -@Data | ||
| 14 | -public class ProductPropertyValueBaseVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "ๅฑๆง้กน็็ผๅท", required = true, example = "1024") | ||
| 17 | - @NotNull(message = "ๅฑๆง้กน็็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 18 | - private Long propertyId; | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๅ็งฐ", required = true, example = "็บข่ฒ") | ||
| 21 | - @NotEmpty(message = "ๅ็งฐๅๅญไธ่ฝไธบ็ฉบ") | ||
| 22 | - private String name; | ||
| 23 | - | ||
| 24 | - @Schema(description = "ๅคๆณจ", example = "้ข่ฒ") | ||
| 25 | - private String remark; | ||
| 26 | - | ||
| 27 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueCreateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.*; | ||
| 5 | - | ||
| 6 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅฑๆงๅผๅๅปบ Request VO") | ||
| 7 | -@Data | ||
| 8 | -@EqualsAndHashCode(callSuper = true) | ||
| 9 | -@ToString(callSuper = true) | ||
| 10 | -public class ProductPropertyValueCreateReqVO extends ProductPropertyValueBaseVO { | ||
| 11 | - | ||
| 12 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueDetailRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | ||
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | ||
| 5 | -import lombok.Data; | ||
| 6 | - | ||
| 7 | -@ApiModel("็ฎก็ๅๅฐ - ๅๅๅฑๆงๅผ็ๆ็ป Response VO") | ||
| 8 | -@Data | ||
| 9 | -public class ProductPropertyValueDetailRespVO { | ||
| 10 | - | ||
| 11 | - @ApiModelProperty(value = "ๅฑๆง็็ผๅท", required = true, example = "1") | ||
| 12 | - private Long propertyId; | ||
| 13 | - | ||
| 14 | - @ApiModelProperty(value = "ๅฑๆง็ๅ็งฐ", required = true, example = "้ข่ฒ") | ||
| 15 | - private String propertyName; | ||
| 16 | - | ||
| 17 | - @ApiModelProperty(value = "ๅฑๆงๅผ็็ผๅท", required = true, example = "1024") | ||
| 18 | - private Long valueId; | ||
| 19 | - | ||
| 20 | - @ApiModelProperty(value = "ๅฑๆงๅผ็ๅ็งฐ", required = true, example = "็บข่ฒ") | ||
| 21 | - private String valueName; | ||
| 22 | - | ||
| 23 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValuePageReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.EqualsAndHashCode; | ||
| 7 | -import lombok.ToString; | ||
| 8 | - | ||
| 9 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅฑๆงๅผๅ้กต Request VO") | ||
| 10 | -@Data | ||
| 11 | -@EqualsAndHashCode(callSuper = true) | ||
| 12 | -@ToString(callSuper = true) | ||
| 13 | -public class ProductPropertyValuePageReqVO extends PageParam { | ||
| 14 | - | ||
| 15 | - @Schema(description = "ๅฑๆง้กน็็ผๅท", example = "1024") | ||
| 16 | - private String propertyId; | ||
| 17 | - | ||
| 18 | - @Schema(description = "ๅ็งฐ", example = "็บข่ฒ") | ||
| 19 | - private String name; | ||
| 20 | - | ||
| 21 | - @Schema(description = "็ถๆ - ๅ่ง CommonStatusEnum ๆไธพ", required = true, example = "1") | ||
| 22 | - private Integer status; | ||
| 23 | - | ||
| 24 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅฑๆงๅผ Response VO") | ||
| 11 | -@Data | ||
| 12 | -@EqualsAndHashCode(callSuper = true) | ||
| 13 | -@ToString(callSuper = true) | ||
| 14 | -public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "็ผๅท", required = true, example = "10") | ||
| 17 | - private Long id; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅๅปบๆถ้ด") | ||
| 20 | - private LocalDateTime createTime; | ||
| 21 | - | ||
| 22 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueUpdateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.*; | ||
| 5 | -import javax.validation.constraints.*; | ||
| 6 | - | ||
| 7 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅๅฑๆงๅผๆดๆฐ Request VO") | ||
| 8 | -@Data | ||
| 9 | -@EqualsAndHashCode(callSuper = true) | ||
| 10 | -@ToString(callSuper = true) | ||
| 11 | -public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO { | ||
| 12 | - | ||
| 13 | - @Schema(description = "ไธป้ฎ", required = true, example = "1024") | ||
| 14 | - @NotNull(message = "ไธป้ฎไธ่ฝไธบ็ฉบ") | ||
| 15 | - private Long id; | ||
| 16 | - | ||
| 17 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/ProductSkuController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.sku; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 5 | -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuOptionRespVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; | ||
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 10 | -import cn.iocoder.yudao.module.product.service.sku.ProductSkuService; | ||
| 11 | -import cn.iocoder.yudao.module.product.service.spu.ProductSpuService; | ||
| 12 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 13 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 14 | -import org.springframework.validation.annotation.Validated; | ||
| 15 | -import org.springframework.web.bind.annotation.GetMapping; | ||
| 16 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 17 | -import org.springframework.web.bind.annotation.RestController; | ||
| 18 | - | ||
| 19 | -import javax.annotation.Resource; | ||
| 20 | -import java.util.Collections; | ||
| 21 | -import java.util.List; | ||
| 22 | -import java.util.Map; | ||
| 23 | - | ||
| 24 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 25 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | ||
| 26 | - | ||
| 27 | -@Tag(name = "็ฎก็ๅๅฐ - ๅๅ sku") | ||
| 28 | -@RestController | ||
| 29 | -@RequestMapping("/product/sku") | ||
| 30 | -@Validated | ||
| 31 | -public class ProductSkuController { | ||
| 32 | - | ||
| 33 | - @Resource | ||
| 34 | - private ProductSkuService productSkuService; | ||
| 35 | - @Resource | ||
| 36 | - private ProductSpuService productSpuService; | ||
| 37 | - | ||
| 38 | - @GetMapping("/get-option-list") | ||
| 39 | - @Operation(summary = "่ทๅพๅๅ SKU ้้กน็ๅ่กจ") | ||
| 40 | -// @PreAuthorize("@ss.hasPermission('product:sku:query')") | ||
| 41 | - public CommonResult<List<ProductSkuOptionRespVO>> getSkuOptionList() { | ||
| 42 | - // ่ทๅพ SKU ๅ่กจ | ||
| 43 | - List<ProductSkuDO> skus = productSkuService.getSkuList(); | ||
| 44 | - if (CollUtil.isEmpty(skus)) { | ||
| 45 | - return success(Collections.emptyList()); | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - // ่ทๅพๅฏนๅบ็ SPU ๆ ๅฐ | ||
| 49 | - Map<Long, ProductSpuDO> spuMap = productSpuService.getSpuMap(convertSet(skus, ProductSkuDO::getSpuId)); | ||
| 50 | - // ่ฝฌๆขไธบ่ฟๅ็ปๆ | ||
| 51 | - List<ProductSkuOptionRespVO> skuVOs = ProductSkuConvert.INSTANCE.convertList05(skus); | ||
| 52 | - skuVOs.forEach(sku -> MapUtils.findAndThen(spuMap, sku.getSpuId(), | ||
| 53 | - spu -> sku.setSpuId(spu.getId()).setSpuName(spu.getName()))); | ||
| 54 | - return success(skuVOs); | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.sku.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | ||
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 6 | -import lombok.AllArgsConstructor; | ||
| 7 | -import lombok.Data; | ||
| 8 | -import lombok.NoArgsConstructor; | ||
| 9 | - | ||
| 10 | -import javax.validation.constraints.NotEmpty; | ||
| 11 | -import javax.validation.constraints.NotNull; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | -* ๅๅ SKU Base VO๏ผๆไพ็ปๆทปๅ ใไฟฎๆนใ่ฏฆ็ป็ๅญ VO ไฝฟ็จ | ||
| 15 | -* ๅฆๆๅญ VO ๅญๅจๅทฎๅผ็ๅญๆฎต๏ผ่ฏทไธ่ฆๆทปๅ ๅฐ่ฟ้๏ผๅฝฑๅ Swagger ๆๆกฃ็ๆ | ||
| 16 | -*/ | ||
| 17 | -@Data | ||
| 18 | -public class ProductSkuBaseVO { | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๅๅ SKU ๅๅญ", required = true, example = "่้") | ||
| 21 | - @NotEmpty(message = "ๅๅ SKU ๅๅญไธ่ฝไธบ็ฉบ") | ||
| 22 | - private String name; | ||
| 23 | - | ||
| 24 | - @Schema(description = "้ๅฎไปทๆ ผ๏ผๅไฝ๏ผๅ", required = true, example = "1024", notes = "ๅไฝ๏ผๅ") | ||
| 25 | - @NotNull(message = "้ๅฎไปทๆ ผ๏ผๅไฝ๏ผๅไธ่ฝไธบ็ฉบ") | ||
| 26 | - private Integer price; | ||
| 27 | - | ||
| 28 | - @Schema(description = "ๅธๅบไปท", example = "1024", notes = "ๅไฝ๏ผๅ") | ||
| 29 | - private Integer marketPrice; | ||
| 30 | - | ||
| 31 | - @Schema(description = "ๆๆฌไปท", example = "1024", notes = "ๅไฝ๏ผๅ") | ||
| 32 | - private Integer costPrice; | ||
| 33 | - | ||
| 34 | - @Schema(description = "ๆกๅฝข็ ", example = "haha") | ||
| 35 | - private String barCode; | ||
| 36 | - | ||
| 37 | - @Schema(description = "ๅพ็ๅฐๅ", required = true, example = "https://www.iocoder.cn/xx.png") | ||
| 38 | - @NotNull(message = "ๅพ็ๅฐๅไธ่ฝไธบ็ฉบ") | ||
| 39 | - private String picUrl; | ||
| 40 | - | ||
| 41 | - @Schema(description = "SKU ็ถๆ", required = true, example = "1", notes = "ๅ่ง CommonStatusEnum ๆไธพ") | ||
| 42 | - @NotNull(message = "SKU ็ถๆไธ่ฝไธบ็ฉบ") | ||
| 43 | - @InEnum(CommonStatusEnum.class) | ||
| 44 | - private Integer status; | ||
| 45 | - | ||
| 46 | - @Schema(description = "ๅบๅญ", required = true, example = "1") | ||
| 47 | - @NotNull(message = "ๅบๅญไธ่ฝไธบ็ฉบ") | ||
| 48 | - private Integer stock; | ||
| 49 | - | ||
| 50 | - @Schema(description = "้ข่ญฆ้ขๅญ", example = "1") | ||
| 51 | - private Integer warnStock; | ||
| 52 | - | ||
| 53 | - @Schema(description = "ๅๅ้้ - ๅไฝ๏ผkg ๅๅ ", example = "1") | ||
| 54 | - private Double weight; | ||
| 55 | - | ||
| 56 | - @Schema(description = "ๅๅไฝ็งฏ - ๅไฝ๏ผm^3 ๅนณ็ฑณ", example = "1024") | ||
| 57 | - private Double volume; | ||
| 58 | - | ||
| 59 | - @ApiModel("ๅๅๅฑๆง") | ||
| 60 | - @Data | ||
| 61 | - @AllArgsConstructor | ||
| 62 | - @NoArgsConstructor | ||
| 63 | - public static class Property { | ||
| 64 | - | ||
| 65 | - @Schema(description = "ๅฑๆง็ผๅท", required = true, example = "1") | ||
| 66 | - @NotNull(message = "ๅฑๆง็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 67 | - private Long propertyId; | ||
| 68 | - | ||
| 69 | - @Schema(description = "ๅฑๆงๅผ็ผๅท", required = true, example = "1024") | ||
| 70 | - @NotNull(message = "ๅฑๆงๅผ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 71 | - private Long valueId; | ||
| 72 | - | ||
| 73 | - } | ||
| 74 | - | ||
| 75 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuCreateOrUpdateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.sku.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import java.util.List; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SKU ๅๅปบ/ๆดๆฐ Request VO") | ||
| 11 | -@Data | ||
| 12 | -@EqualsAndHashCode(callSuper = true) | ||
| 13 | -@ToString(callSuper = true) | ||
| 14 | -public class ProductSkuCreateOrUpdateReqVO extends ProductSkuBaseVO { | ||
| 15 | - | ||
| 16 | - /** | ||
| 17 | - * ๅฑๆงๆฐ็ป | ||
| 18 | - */ | ||
| 19 | - private List<Property> properties; | ||
| 20 | - | ||
| 21 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuOptionRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.sku.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SKU ้้กน Response VO,็จไบๅ็ซฏ SELECT ้้กน") | ||
| 7 | -@Data | ||
| 8 | -public class ProductSkuOptionRespVO { | ||
| 9 | - | ||
| 10 | - @Schema(description = "ไธป้ฎ", required = true, example = "1024") | ||
| 11 | - private Long id; | ||
| 12 | - | ||
| 13 | - @Schema(description = "ๅๅ SKU ๅๅญ", example = "็บข่ฒ") | ||
| 14 | - private String name; | ||
| 15 | - | ||
| 16 | - @Schema(description = "้ๅฎไปทๆ ผ,ๅไฝ๏ผๅ", required = true, example = "100") | ||
| 17 | - private String price; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅบๅญ", required = true, example = "100") | ||
| 20 | - private Integer stock; | ||
| 21 | - | ||
| 22 | - // ========== ๅๅ SPU ไฟกๆฏ ========== | ||
| 23 | - | ||
| 24 | - @Schema(description = "ๅๅ SPU ็ผๅท", required = true, example = "1") | ||
| 25 | - private Long spuId; | ||
| 26 | - | ||
| 27 | - @Schema(description = "ๅๅ SPU ๅๅญ", required = true, example = "iPhone 11") | ||
| 28 | - private String spuName; | ||
| 29 | - | ||
| 30 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.sku.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | -import java.util.List; | ||
| 10 | - | ||
| 11 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SKU Response VO") | ||
| 12 | -@Data | ||
| 13 | -@EqualsAndHashCode(callSuper = true) | ||
| 14 | -@ToString(callSuper = true) | ||
| 15 | -public class ProductSkuRespVO extends ProductSkuBaseVO { | ||
| 16 | - | ||
| 17 | - @Schema(description = "ไธป้ฎ", required = true, example = "1024") | ||
| 18 | - private Long id; | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๅๅปบๆถ้ด") | ||
| 21 | - private LocalDateTime createTime; | ||
| 22 | - | ||
| 23 | - /** | ||
| 24 | - * ๅฑๆงๆฐ็ป | ||
| 25 | - */ | ||
| 26 | - private List<Property> properties; | ||
| 27 | - | ||
| 28 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.http deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; | ||
| 6 | -import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; | ||
| 7 | -import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; | ||
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 10 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService; | ||
| 11 | -import cn.iocoder.yudao.module.product.service.property.bo.ProductPropertyValueDetailRespBO; | ||
| 12 | -import cn.iocoder.yudao.module.product.service.sku.ProductSkuService; | ||
| 13 | -import cn.iocoder.yudao.module.product.service.spu.ProductSpuService; | ||
| 14 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 15 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 16 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 17 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 18 | -import org.springframework.validation.annotation.Validated; | ||
| 19 | -import org.springframework.web.bind.annotation.*; | ||
| 20 | - | ||
| 21 | -import javax.annotation.Resource; | ||
| 22 | -import javax.validation.Valid; | ||
| 23 | -import java.util.List; | ||
| 24 | - | ||
| 25 | -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 26 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 27 | -import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.SPU_NOT_EXISTS; | ||
| 28 | - | ||
| 29 | -@Tag(name = "็ฎก็ๅๅฐ - ๅๅ SPU") | ||
| 30 | -@RestController | ||
| 31 | -@RequestMapping("/product/spu") | ||
| 32 | -@Validated | ||
| 33 | -public class ProductSpuController { | ||
| 34 | - | ||
| 35 | - @Resource | ||
| 36 | - private ProductSpuService productSpuService; | ||
| 37 | - @Resource | ||
| 38 | - private ProductSkuService productSkuService; | ||
| 39 | - @Resource | ||
| 40 | - private ProductPropertyValueService productPropertyValueService; | ||
| 41 | - | ||
| 42 | - @PostMapping("/create") | ||
| 43 | - @Operation(summary = "ๅๅปบๅๅ SPU") | ||
| 44 | - @PreAuthorize("@ss.hasPermission('product:spu:create')") | ||
| 45 | - public CommonResult<Long> createProductSpu(@Valid @RequestBody ProductSpuCreateReqVO createReqVO) { | ||
| 46 | - return success(productSpuService.createSpu(createReqVO)); | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | - @PutMapping("/update") | ||
| 50 | - @Operation(summary = "ๆดๆฐๅๅ SPU") | ||
| 51 | - @PreAuthorize("@ss.hasPermission('product:spu:update')") | ||
| 52 | - public CommonResult<Boolean> updateSpu(@Valid @RequestBody ProductSpuUpdateReqVO updateReqVO) { | ||
| 53 | - productSpuService.updateSpu(updateReqVO); | ||
| 54 | - return success(true); | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - @DeleteMapping("/delete") | ||
| 58 | - @Operation(summary = "ๅ ้คๅๅ SPU") | ||
| 59 | - @ApiImplicitParam(name = "id", value = "็ผๅท", required = true, dataTypeClass = Long.class) | ||
| 60 | - @PreAuthorize("@ss.hasPermission('product:spu:delete')") | ||
| 61 | - public CommonResult<Boolean> deleteSpu(@RequestParam("id") Long id) { | ||
| 62 | - productSpuService.deleteSpu(id); | ||
| 63 | - return success(true); | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - @GetMapping("/get-detail") | ||
| 67 | - @Operation(summary = "่ทๅพๅๅ SPU ๆ็ป") | ||
| 68 | - @Parameter(name = "id", value = "็ผๅท", required = true, example = "1024") | ||
| 69 | - @PreAuthorize("@ss.hasPermission('product:spu:query')") | ||
| 70 | - public CommonResult<ProductSpuDetailRespVO> getSpuDetail(@RequestParam("id") Long id) { | ||
| 71 | - // ่ทๅพๅๅ SPU | ||
| 72 | - ProductSpuDO spu = productSpuService.getSpu(id); | ||
| 73 | - if (spu == null) { | ||
| 74 | - throw exception(SPU_NOT_EXISTS); | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - // ๆฅ่ฏขๅๅ SKU | ||
| 78 | - List<ProductSkuDO> skus = productSkuService.getSkuListBySpuIdAndStatus(spu.getId(), null); | ||
| 79 | - // ๆฅ่ฏขๅๅๅฑๆง | ||
| 80 | - List<ProductPropertyValueDetailRespBO> propertyValues = productPropertyValueService | ||
| 81 | - .getPropertyValueDetailList(ProductSkuConvert.INSTANCE.convertPropertyValueIds(skus)); | ||
| 82 | - // ๆผๆฅ | ||
| 83 | - return success(ProductSpuConvert.INSTANCE.convert03(spu, skus, propertyValues)); | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - @GetMapping("/get-simple-list") | ||
| 87 | - @Operation(summary = "่ทๅพๅๅ SPU ็ฒพ็ฎๅ่กจ") | ||
| 88 | - @PreAuthorize("@ss.hasPermission('product:spu:query')") | ||
| 89 | - public CommonResult<List<ProductSpuSimpleRespVO>> getSpuSimpleList() { | ||
| 90 | - List<ProductSpuDO> list = productSpuService.getSpuList(); | ||
| 91 | - return success(ProductSpuConvert.INSTANCE.convertList02(list)); | ||
| 92 | - } | ||
| 93 | - | ||
| 94 | - @GetMapping("/page") | ||
| 95 | - @Operation(summary = "่ทๅพๅๅ SPU ๅ้กต") | ||
| 96 | - @PreAuthorize("@ss.hasPermission('product:spu:query')") | ||
| 97 | - public CommonResult<PageResult<ProductSpuRespVO>> getSpuPage(@Valid ProductSpuPageReqVO pageVO) { | ||
| 98 | - return success(ProductSpuConvert.INSTANCE.convertPage(productSpuService.getSpuPage(pageVO))); | ||
| 99 | - } | ||
| 100 | - | ||
| 101 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | ||
| 4 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuSpecTypeEnum; | ||
| 5 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; | ||
| 6 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 7 | -import lombok.Data; | ||
| 8 | - | ||
| 9 | -import javax.validation.constraints.NotEmpty; | ||
| 10 | -import javax.validation.constraints.NotNull; | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * ๅๅ SPU Base VO๏ผๆไพ็ปๆทปๅ ใไฟฎๆนใ่ฏฆ็ป็ๅญ VO ไฝฟ็จ | ||
| 15 | - * ๅฆๆๅญ VO ๅญๅจๅทฎๅผ็ๅญๆฎต๏ผ่ฏทไธ่ฆๆทปๅ ๅฐ่ฟ้๏ผๅฝฑๅ Swagger ๆๆกฃ็ๆ | ||
| 16 | - */ | ||
| 17 | -@Data | ||
| 18 | -public class ProductSpuBaseVO { | ||
| 19 | - | ||
| 20 | - @Schema(description = = "ๅๅๅ็งฐ", required = true, example = "่้") | ||
| 21 | - @NotEmpty(message = "ๅๅๅ็งฐไธ่ฝไธบ็ฉบ") | ||
| 22 | - private String name; | ||
| 23 | - | ||
| 24 | - @Schema(description = = "ๅๅ็ผ็ ", example = "yudaoyuanma") | ||
| 25 | - private String code; | ||
| 26 | - | ||
| 27 | - @Schema(description = = "ไฟ้่ฏญ", example = "ๅฅฝๅ๏ผ") | ||
| 28 | - private String sellPoint; | ||
| 29 | - | ||
| 30 | - @Schema(description = = "ๅๅ่ฏฆๆ ", required = true, example = "ๆๆฏๅๅๆ่ฟฐ") | ||
| 31 | - @NotNull(message = "ๅๅ่ฏฆๆ ไธ่ฝไธบ็ฉบ") | ||
| 32 | - private String description; | ||
| 33 | - | ||
| 34 | - @Schema(description = = "ๅๅๅ็ฑป็ผๅท", required = true, example = "1") | ||
| 35 | - @NotNull(message = "ๅๅๅ็ฑป็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 36 | - private Long categoryId; | ||
| 37 | - | ||
| 38 | - @Schema(description = = "ๅๅๅ็็ผๅท", example = "1") | ||
| 39 | - private Long brandId; | ||
| 40 | - | ||
| 41 | - @Schema(description = = "ๅๅๅพ็็ๆฐ็ป", required = true) | ||
| 42 | - @NotNull(message = "ๅๅๅพ็็ๆฐ็ปไธ่ฝไธบ็ฉบ") | ||
| 43 | - private List<String> picUrls; | ||
| 44 | - | ||
| 45 | - @Schema(description = = "ๅๅ่ง้ข", required = true) | ||
| 46 | - private String videoUrl; | ||
| 47 | - | ||
| 48 | - @Schema(description = = "ๆๅบๅญๆฎต", required = true, example = "1") | ||
| 49 | - private Integer sort; | ||
| 50 | - | ||
| 51 | - @Schema(description = = "ๅๅ็ถๆ ๅ่ง ProductSpuStatusEnum ๆไธพ็ฑป", required = true, example = "1") | ||
| 52 | - @NotNull(message = "ๅๅ็ถๆไธ่ฝไธบ็ฉบ") | ||
| 53 | - @InEnum(ProductSpuStatusEnum.class) | ||
| 54 | - private Integer status; | ||
| 55 | - | ||
| 56 | - // ========== SKU ็ธๅ ณๅญๆฎต ========= | ||
| 57 | - | ||
| 58 | - @Schema(description = = "่งๆ ผ็ฑปๅ ๅ่ง ProductSpuSpecTypeEnum ๆไธพ็ฑป", required = true, example = "1") | ||
| 59 | - @NotNull(message = "่งๆ ผ็ฑปๅไธ่ฝไธบ็ฉบ") | ||
| 60 | - @InEnum(ProductSpuSpecTypeEnum.class) | ||
| 61 | - private Integer specType; | ||
| 62 | - | ||
| 63 | - @Schema(description = = "ๆฏๅฆๅฑ็คบๅบๅญ", required = true, example = "true") | ||
| 64 | - @NotNull(message = "ๆฏๅฆๅฑ็คบๅบๅญไธ่ฝไธบ็ฉบ") | ||
| 65 | - private Boolean showStock; | ||
| 66 | - | ||
| 67 | - @Schema(description = = "ๅธๅบไปท", example = "1024") | ||
| 68 | - private Integer marketPrice; | ||
| 69 | - | ||
| 70 | - // ========== ็ป่ฎก็ธๅ ณๅญๆฎต ========= | ||
| 71 | - | ||
| 72 | - @Schema(description = = "่ๆ้้", required = true, example = "1024") | ||
| 73 | - @NotNull(message = "่ๆ้้ไธ่ฝไธบ็ฉบ") | ||
| 74 | - private Integer virtualSalesCount; | ||
| 75 | - | ||
| 76 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuCreateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; | ||
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.EqualsAndHashCode; | ||
| 7 | -import lombok.ToString; | ||
| 8 | - | ||
| 9 | -import javax.validation.Valid; | ||
| 10 | -import java.util.List; | ||
| 11 | - | ||
| 12 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SPU ๅๅปบ Request VO") | ||
| 13 | -@Data | ||
| 14 | -@EqualsAndHashCode(callSuper = true) | ||
| 15 | -@ToString(callSuper = true) | ||
| 16 | -public class ProductSpuCreateReqVO extends ProductSpuBaseVO { | ||
| 17 | - | ||
| 18 | - /** | ||
| 19 | - * SKU ๆฐ็ป | ||
| 20 | - */ | ||
| 21 | - @Valid | ||
| 22 | - private List<ProductSkuCreateOrUpdateReqVO> skus; | ||
| 23 | - | ||
| 24 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueDetailRespVO; | ||
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuBaseVO; | ||
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 6 | -import lombok.Data; | ||
| 7 | -import lombok.EqualsAndHashCode; | ||
| 8 | -import lombok.ToString; | ||
| 9 | - | ||
| 10 | -import java.util.List; | ||
| 11 | - | ||
| 12 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SPU ่ฏฆ็ป Response VO ๅ ๆฌๅ ณ่็ SKU ็ญไฟกๆฏ") | ||
| 13 | -@Data | ||
| 14 | -@EqualsAndHashCode(callSuper = true) | ||
| 15 | -@ToString(callSuper = true) | ||
| 16 | -public class ProductSpuDetailRespVO extends ProductSpuRespVO { | ||
| 17 | - | ||
| 18 | - // ========== SKU ็ธๅ ณๅญๆฎต ========= | ||
| 19 | - | ||
| 20 | - /** | ||
| 21 | - * SKU ๆฐ็ป | ||
| 22 | - */ | ||
| 23 | - private List<Sku> skus; | ||
| 24 | - | ||
| 25 | - @Schema(description = "็ฎก็ๅๅฐ - ๅๅ SKU ่ฏฆ็ป Response VO") | ||
| 26 | - @Data | ||
| 27 | - @EqualsAndHashCode(callSuper = true) | ||
| 28 | - @ToString(callSuper = true) | ||
| 29 | - public static class Sku extends ProductSkuBaseVO { | ||
| 30 | - | ||
| 31 | - /** | ||
| 32 | - * ๅฑๆงๆฐ็ป | ||
| 33 | - */ | ||
| 34 | - private List<ProductPropertyValueDetailRespVO> properties; | ||
| 35 | - | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.EqualsAndHashCode; | ||
| 7 | -import lombok.ToString; | ||
| 8 | - | ||
| 9 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SPU ๅ้กต Request VO") | ||
| 10 | -@Data | ||
| 11 | -@EqualsAndHashCode(callSuper = true) | ||
| 12 | -@ToString(callSuper = true) | ||
| 13 | -public class ProductSpuPageReqVO extends PageParam { | ||
| 14 | - | ||
| 15 | - @Schema(description = "ๅๅๅ็งฐ", example = "yutou") | ||
| 16 | - private String name; | ||
| 17 | - | ||
| 18 | - @Schema(description = "ๅๅ็ผ็ ", example = "yudaoyuanma") | ||
| 19 | - private String code; | ||
| 20 | - | ||
| 21 | - @Schema(description = "ๅ็ฑป็ผๅท", example = "1") | ||
| 22 | - private Long categoryId; | ||
| 23 | - | ||
| 24 | - @Schema(description = "ๅๅๅ็็ผๅท", example = "1") | ||
| 25 | - private Long brandId; | ||
| 26 | - | ||
| 27 | - @Schema(description = "ไธไธๆถ็ถๆ ๅ่ง ProductSpuStatusEnum ๆไธพๅผ", example = "1") | ||
| 28 | - private Integer status; | ||
| 29 | - | ||
| 30 | - @Schema(description = "้้ๆๅฐๅผ", example = "1") | ||
| 31 | - private Integer salesCountMin; | ||
| 32 | - | ||
| 33 | - @Schema(description = "้้ๆๅคงๅผ", example = "1024") | ||
| 34 | - private Integer salesCountMax; | ||
| 35 | - | ||
| 36 | - @Schema(description = "ๅธๅบไปทๆๅฐๅผ", example = "1") | ||
| 37 | - private Integer marketPriceMin; | ||
| 38 | - | ||
| 39 | - @Schema(description = "ๅธๅบไปทๆๅคงๅผ", example = "1024") | ||
| 40 | - private Integer marketPriceMax; | ||
| 41 | - | ||
| 42 | - @Schema(description = "ๆฏๅฆๅบๅญๅ่ญฆ", example = "true") | ||
| 43 | - private Boolean alarmStock; | ||
| 44 | - | ||
| 45 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | - | ||
| 10 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SPU Response VO") | ||
| 11 | -@Data | ||
| 12 | -@EqualsAndHashCode(callSuper = true) | ||
| 13 | -@ToString(callSuper = true) | ||
| 14 | -public class ProductSpuRespVO extends ProductSpuBaseVO { | ||
| 15 | - | ||
| 16 | - @Schema(description = "ไธป้ฎ", required = true, example = "1") | ||
| 17 | - private Long id; | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅๅปบๆถ้ด") | ||
| 20 | - private LocalDateTime createTime; | ||
| 21 | - | ||
| 22 | - // ========== SKU ็ธๅ ณๅญๆฎต ========= | ||
| 23 | - | ||
| 24 | - @ApiModelProperty(value = "ๅบๅญ", required = true, example = "true") | ||
| 25 | - private Integer totalStock; | ||
| 26 | - | ||
| 27 | - @ApiModelProperty(value = " ๆๅฐไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 28 | - private Integer minPrice; | ||
| 29 | - | ||
| 30 | - @ApiModelProperty(value = "ๆๅคงไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 31 | - private Integer maxPrice; | ||
| 32 | - | ||
| 33 | - @ApiModelProperty(value = "ๅๅ้้", example = "1024") | ||
| 34 | - private Integer salesCount; | ||
| 35 | - | ||
| 36 | - // ========== ็ป่ฎก็ธๅ ณๅญๆฎต ========= | ||
| 37 | - | ||
| 38 | - @ApiModelProperty(value = "็นๅป้", example = "1024") | ||
| 39 | - private Integer clickCount; | ||
| 40 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | -import lombok.EqualsAndHashCode; | ||
| 6 | -import lombok.ToString; | ||
| 7 | - | ||
| 8 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SPU ็ฒพ็ฎ Response VO") | ||
| 9 | -@Data | ||
| 10 | -@EqualsAndHashCode(callSuper = true) | ||
| 11 | -@ToString(callSuper = true) | ||
| 12 | -public class ProductSpuSimpleRespVO extends ProductSpuBaseVO { | ||
| 13 | - | ||
| 14 | - @Schema(description = "ไธป้ฎ", required = true, example = "1") | ||
| 15 | - private Long id; | ||
| 16 | - | ||
| 17 | - @Schema(description = "ๅๅๅ็งฐ", required = true, example = "่้") | ||
| 18 | - private String name; | ||
| 19 | - | ||
| 20 | - @Schema(description = " ๆๅฐไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 21 | - private Integer minPrice; | ||
| 22 | - | ||
| 23 | - @Schema(description = "ๆๅคงไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 24 | - private Integer maxPrice; | ||
| 25 | - | ||
| 26 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; | ||
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | -import lombok.Data; | ||
| 6 | -import lombok.EqualsAndHashCode; | ||
| 7 | -import lombok.ToString; | ||
| 8 | - | ||
| 9 | -import javax.validation.Valid; | ||
| 10 | -import javax.validation.constraints.NotNull; | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -@Schema(description = "็ฎก็ๅๅฐ - ๅๅ SPU ๆดๆฐ Request VO") | ||
| 14 | -@Data | ||
| 15 | -@EqualsAndHashCode(callSuper = true) | ||
| 16 | -@ToString(callSuper = true) | ||
| 17 | -public class ProductSpuUpdateReqVO extends ProductSpuBaseVO { | ||
| 18 | - | ||
| 19 | - @Schema(description = "ๅๅ็ผๅท", required = true, example = "1") | ||
| 20 | - @NotNull(message = "ๅๅ็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 21 | - private Long id; | ||
| 22 | - | ||
| 23 | - /** | ||
| 24 | - * SKU ๆฐ็ป | ||
| 25 | - */ | ||
| 26 | - @Valid | ||
| 27 | - private List<ProductSkuCreateOrUpdateReqVO> skus; | ||
| 28 | - | ||
| 29 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.category; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | -import cn.iocoder.yudao.module.product.controller.app.category.vo.AppCategoryRespVO; | ||
| 5 | -import cn.iocoder.yudao.module.product.convert.category.ProductCategoryConvert; | ||
| 6 | -import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; | ||
| 7 | -import cn.iocoder.yudao.module.product.service.category.ProductCategoryService; | ||
| 8 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 9 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 10 | -import org.springframework.validation.annotation.Validated; | ||
| 11 | -import org.springframework.web.bind.annotation.GetMapping; | ||
| 12 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 13 | -import org.springframework.web.bind.annotation.RestController; | ||
| 14 | - | ||
| 15 | -import javax.annotation.Resource; | ||
| 16 | -import java.util.Comparator; | ||
| 17 | -import java.util.List; | ||
| 18 | - | ||
| 19 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 20 | - | ||
| 21 | -@Tag(name = "็จๆท APP - ๅๅๅ็ฑป") | ||
| 22 | -@RestController | ||
| 23 | -@RequestMapping("/product/category") | ||
| 24 | -@Validated | ||
| 25 | -public class AppCategoryController { | ||
| 26 | - | ||
| 27 | - @Resource | ||
| 28 | - private ProductCategoryService categoryService; | ||
| 29 | - | ||
| 30 | - @GetMapping("/list") | ||
| 31 | - @Operation(summary = "่ทๅพๅๅๅ็ฑปๅ่กจ") | ||
| 32 | - public CommonResult<List<AppCategoryRespVO>> getProductCategoryList() { | ||
| 33 | - List<ProductCategoryDO> list = categoryService.getEnableCategoryList(); | ||
| 34 | - list.sort(Comparator.comparing(ProductCategoryDO::getSort)); | ||
| 35 | - return success(ProductCategoryConvert.INSTANCE.convertList03(list)); | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.category.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.Data; | ||
| 5 | - | ||
| 6 | -import javax.validation.constraints.NotBlank; | ||
| 7 | -import javax.validation.constraints.NotNull; | ||
| 8 | - | ||
| 9 | -@Data | ||
| 10 | -@Schema(description = "็จๆท APP - ๅๅๅ็ฑป Response VO") | ||
| 11 | -public class AppCategoryRespVO { | ||
| 12 | - | ||
| 13 | - @Schema(description = "ๅ็ฑป็ผๅท", required = true, example = "2") | ||
| 14 | - private Long id; | ||
| 15 | - | ||
| 16 | - @Schema(description = "็ถๅ็ฑป็ผๅท", required = true, example = "1") | ||
| 17 | - @NotNull(message = "็ถๅ็ฑป็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 18 | - private Long parentId; | ||
| 19 | - | ||
| 20 | - @Schema(description = "ๅ็ฑปๅ็งฐ", required = true, example = "ๅๅ ฌๆๅ ท") | ||
| 21 | - @NotBlank(message = "ๅ็ฑปๅ็งฐไธ่ฝไธบ็ฉบ") | ||
| 22 | - private String name; | ||
| 23 | - | ||
| 24 | - @Schema(description = "ๅ็ฑปๅพ็", required = true) | ||
| 25 | - @NotBlank(message = "ๅ็ฑปๅพ็ไธ่ฝไธบ็ฉบ") | ||
| 26 | - private String picUrl; | ||
| 27 | - | ||
| 28 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/property/package-info.java deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/property/vo/property/package-info.java deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/property/vo/value/AppProductPropertyValueDetailRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.property.vo.value; | ||
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | ||
| 5 | -import lombok.Data; | ||
| 6 | - | ||
| 7 | -@ApiModel("็จๆท App - ๅๅๅฑๆงๅผ็ๆ็ป Response VO") | ||
| 8 | -@Data | ||
| 9 | -public class AppProductPropertyValueDetailRespVO { | ||
| 10 | - | ||
| 11 | - @ApiModelProperty(value = "ๅฑๆง็็ผๅท", required = true, example = "1") | ||
| 12 | - private Long propertyId; | ||
| 13 | - | ||
| 14 | - @ApiModelProperty(value = "ๅฑๆง็ๅ็งฐ", required = true, example = "้ข่ฒ") | ||
| 15 | - private String propertyName; | ||
| 16 | - | ||
| 17 | - @ApiModelProperty(value = "ๅฑๆงๅผ็็ผๅท", required = true, example = "1024") | ||
| 18 | - private Long valueId; | ||
| 19 | - | ||
| 20 | - @ApiModelProperty(value = "ๅฑๆงๅผ็ๅ็งฐ", required = true, example = "็บข่ฒ") | ||
| 21 | - private String valueName; | ||
| 22 | - | ||
| 23 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.http deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 5 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuPageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuDetailRespVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuPageItemRespVO; | ||
| 9 | -import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; | ||
| 10 | -import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; | ||
| 11 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 12 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 13 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; | ||
| 14 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService; | ||
| 15 | -import cn.iocoder.yudao.module.product.service.property.bo.ProductPropertyValueDetailRespBO; | ||
| 16 | -import cn.iocoder.yudao.module.product.service.sku.ProductSkuService; | ||
| 17 | -import cn.iocoder.yudao.module.product.service.spu.ProductSpuService; | ||
| 18 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 19 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 20 | -import org.springframework.validation.annotation.Validated; | ||
| 21 | -import org.springframework.web.bind.annotation.GetMapping; | ||
| 22 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 23 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 24 | -import org.springframework.web.bind.annotation.RestController; | ||
| 25 | - | ||
| 26 | -import javax.annotation.Resource; | ||
| 27 | -import javax.validation.Valid; | ||
| 28 | -import java.util.List; | ||
| 29 | - | ||
| 30 | -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 31 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 32 | -import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.SPU_NOT_ENABLE; | ||
| 33 | -import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.SPU_NOT_EXISTS; | ||
| 34 | - | ||
| 35 | -@Tag(name = "็จๆท APP - ๅๅspu") | ||
| 36 | -@RestController | ||
| 37 | -@RequestMapping("/product/spu") | ||
| 38 | -@Validated | ||
| 39 | -public class AppProductSpuController { | ||
| 40 | - | ||
| 41 | - @Resource | ||
| 42 | - private ProductSpuService productSpuService; | ||
| 43 | - @Resource | ||
| 44 | - private ProductSkuService productSkuService; | ||
| 45 | - @Resource | ||
| 46 | - private ProductPropertyValueService productPropertyValueService; | ||
| 47 | - | ||
| 48 | - @GetMapping("/page") | ||
| 49 | - @Operation(summary = "่ทๅพๅๅ SPU ๅ้กต") | ||
| 50 | - public CommonResult<PageResult<AppProductSpuPageItemRespVO>> getSpuPage(@Valid AppProductSpuPageReqVO pageVO) { | ||
| 51 | - PageResult<ProductSpuDO> pageResult = productSpuService.getSpuPage(pageVO, ProductSpuStatusEnum.ENABLE.getStatus()); | ||
| 52 | - return success(ProductSpuConvert.INSTANCE.convertPage02(pageResult)); | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - @GetMapping("/get-detail") | ||
| 56 | - @Operation(summary = "่ทๅพๅๅ SPU ๆ็ป") | ||
| 57 | - @ApiImplicitParam(name = "id", value = "็ผๅท", required = true, dataTypeClass = Long.class) | ||
| 58 | - public CommonResult<AppProductSpuDetailRespVO> getSpuDetail(@RequestParam("id") Long id) { | ||
| 59 | - // ่ทๅพๅๅ SPU | ||
| 60 | - ProductSpuDO spu = productSpuService.getSpu(id); | ||
| 61 | - if (spu == null) { | ||
| 62 | - throw exception(SPU_NOT_EXISTS); | ||
| 63 | - } | ||
| 64 | - if (!ProductSpuStatusEnum.isEnable(spu.getStatus())) { | ||
| 65 | - throw exception(SPU_NOT_ENABLE); | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - // ๆฅ่ฏขๅๅ SKU | ||
| 69 | - List<ProductSkuDO> skus = productSkuService.getSkuListBySpuIdAndStatus(spu.getId(), | ||
| 70 | - CommonStatusEnum.ENABLE.getStatus()); | ||
| 71 | - // ๆฅ่ฏขๅๅๅฑๆง | ||
| 72 | - List<ProductPropertyValueDetailRespBO> propertyValues = productPropertyValueService | ||
| 73 | - .getPropertyValueDetailList(ProductSkuConvert.INSTANCE.convertPropertyValueIds(skus)); | ||
| 74 | - // ๆผๆฅ | ||
| 75 | - return success(ProductSpuConvert.INSTANCE.convert(spu, skus, propertyValues)); | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuDetailRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.controller.app.property.vo.value.AppProductPropertyValueDetailRespVO; | ||
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | -import lombok.Data; | ||
| 7 | - | ||
| 8 | -import java.util.List; | ||
| 9 | - | ||
| 10 | -@ApiModel("็จๆท App - ๅๅ SPU ๆ็ป Response VO") | ||
| 11 | -@Data | ||
| 12 | -public class AppProductSpuDetailRespVO { | ||
| 13 | - | ||
| 14 | - @ApiModelProperty(value = "ๅๅ SPU ็ผๅท", required = true, example = "1") | ||
| 15 | - private Long id; | ||
| 16 | - | ||
| 17 | - // ========== ๅบๆฌไฟกๆฏ ========= | ||
| 18 | - | ||
| 19 | - @ApiModelProperty(value = "ๅๅๅ็งฐ", required = true, example = "่้") | ||
| 20 | - private String name; | ||
| 21 | - | ||
| 22 | - @ApiModelProperty(value = "ไฟ้่ฏญ", example = "ๅฅฝๅ๏ผ") | ||
| 23 | - private String sellPoint; | ||
| 24 | - | ||
| 25 | - @ApiModelProperty(value = "ๅๅ่ฏฆๆ ", required = true, example = "ๆๆฏๅๅๆ่ฟฐ") | ||
| 26 | - private String description; | ||
| 27 | - | ||
| 28 | - @ApiModelProperty(value = "ๅๅๅ็ฑป็ผๅท", required = true, example = "1") | ||
| 29 | - private Long categoryId; | ||
| 30 | - | ||
| 31 | - @ApiModelProperty(value = "ๅๅๅพ็็ๆฐ็ป", required = true) | ||
| 32 | - private List<String> picUrls; | ||
| 33 | - | ||
| 34 | - @ApiModelProperty(value = "ๅๅ่ง้ข", required = true) | ||
| 35 | - private String videoUrl; | ||
| 36 | - | ||
| 37 | - // ========== SKU ็ธๅ ณๅญๆฎต ========= | ||
| 38 | - | ||
| 39 | - @ApiModelProperty(value = "่งๆ ผ็ฑปๅ", required = true, example = "1", notes = "ๅ่ง ProductSpuSpecTypeEnum ๆไธพ็ฑป") | ||
| 40 | - private Integer specType; | ||
| 41 | - | ||
| 42 | - @ApiModelProperty(value = "ๆฏๅฆๅฑ็คบๅบๅญ", required = true, example = "true") | ||
| 43 | - private Boolean showStock; | ||
| 44 | - | ||
| 45 | - @ApiModelProperty(value = " ๆๅฐไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 46 | - private Integer minPrice; | ||
| 47 | - | ||
| 48 | - @ApiModelProperty(value = "ๆๅคงไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 49 | - private Integer maxPrice; | ||
| 50 | - | ||
| 51 | - /** | ||
| 52 | - * SKU ๆฐ็ป | ||
| 53 | - */ | ||
| 54 | - private List<Sku> skus; | ||
| 55 | - | ||
| 56 | - // ========== ็ป่ฎก็ธๅ ณๅญๆฎต ========= | ||
| 57 | - | ||
| 58 | - @ApiModelProperty(value = "ๅๅ้้", required = true, example = "1024") | ||
| 59 | - private Integer salesCount; | ||
| 60 | - | ||
| 61 | - @ApiModel("็จๆท App - ๅๅ SPU ๆ็ป็ SKU ไฟกๆฏ") | ||
| 62 | - @Data | ||
| 63 | - public static class Sku { | ||
| 64 | - | ||
| 65 | - @ApiModelProperty(value = "ๅๅ SKU ็ผๅท", example = "1") | ||
| 66 | - private Long id; | ||
| 67 | - | ||
| 68 | - /** | ||
| 69 | - * ๅๅๅฑๆงๆฐ็ป | ||
| 70 | - */ | ||
| 71 | - private List<AppProductPropertyValueDetailRespVO> properties; | ||
| 72 | - | ||
| 73 | - @ApiModelProperty(value = "้ๅฎไปทๆ ผ๏ผๅไฝ๏ผๅ", required = true, example = "1024", notes = "ๅไฝ๏ผๅ") | ||
| 74 | - private Integer price; | ||
| 75 | - | ||
| 76 | - @ApiModelProperty(value = "ๅธๅบไปท", example = "1024", notes = "ๅไฝ๏ผๅ") | ||
| 77 | - private Integer marketPrice; | ||
| 78 | - | ||
| 79 | - @ApiModelProperty(value = "ๅพ็ๅฐๅ", required = true, example = "https://www.iocoder.cn/xx.png") | ||
| 80 | - private String picUrl; | ||
| 81 | - | ||
| 82 | - @ApiModelProperty(value = "ๅบๅญ", required = true, example = "1") | ||
| 83 | - private Integer stock; | ||
| 84 | - | ||
| 85 | - @ApiModelProperty(value = "ๅๅ้้", example = "1", notes = "ๅไฝ๏ผkg ๅๅ ") | ||
| 86 | - private Double weight; | ||
| 87 | - | ||
| 88 | - @ApiModelProperty(value = "ๅๅไฝ็งฏ", example = "1024", notes = "ๅไฝ๏ผm^3 ๅนณ็ฑณ") | ||
| 89 | - private Double volume; | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuPageItemRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.spu.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | ||
| 5 | -import lombok.Data; | ||
| 6 | - | ||
| 7 | -import javax.validation.constraints.NotEmpty; | ||
| 8 | -import javax.validation.constraints.NotNull; | ||
| 9 | -import java.util.List; | ||
| 10 | - | ||
| 11 | -@ApiModel("็จๆท App - ๅๅ SPU ๅ้กต้กน Response VO") | ||
| 12 | -@Data | ||
| 13 | -public class AppProductSpuPageItemRespVO { | ||
| 14 | - | ||
| 15 | - @ApiModelProperty(value = "ๅๅ SPU ็ผๅท", required = true, example = "1") | ||
| 16 | - private Long id; | ||
| 17 | - | ||
| 18 | - @ApiModelProperty(value = "ๅๅๅ็งฐ", required = true, example = "่้") | ||
| 19 | - @NotEmpty(message = "ๅๅๅ็งฐไธ่ฝไธบ็ฉบ") | ||
| 20 | - private String name; | ||
| 21 | - | ||
| 22 | - @ApiModelProperty(value = "ๅ็ฑป็ผๅท", required = true) | ||
| 23 | - @NotNull(message = "ๅ็ฑป็ผๅทไธ่ฝไธบ็ฉบ") | ||
| 24 | - private Long categoryId; | ||
| 25 | - | ||
| 26 | - @ApiModelProperty(value = "ๅๅๅพ็็ๆฐ็ป", required = true) | ||
| 27 | - private List<String> picUrls; | ||
| 28 | - | ||
| 29 | - @ApiModelProperty(value = " ๆๅฐไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 30 | - private Integer minPrice; | ||
| 31 | - | ||
| 32 | - @ApiModelProperty(value = "ๆๅคงไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ", required = true, example = "1024") | ||
| 33 | - private Integer maxPrice; | ||
| 34 | - | ||
| 35 | - // ========== ็ป่ฎก็ธๅ ณๅญๆฎต ========= | ||
| 36 | - | ||
| 37 | - @ApiModelProperty(value = "ๅๅ้้", example = "1024") | ||
| 38 | - private Integer salesCount; | ||
| 39 | - | ||
| 40 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuPageReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.app.spu.vo; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.util.StrUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
| 5 | -import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 6 | -import io.swagger.annotations.ApiModel; | ||
| 7 | -import io.swagger.annotations.ApiModelProperty; | ||
| 8 | -import lombok.Data; | ||
| 9 | -import lombok.EqualsAndHashCode; | ||
| 10 | -import lombok.ToString; | ||
| 11 | - | ||
| 12 | -import javax.validation.constraints.AssertTrue; | ||
| 13 | - | ||
| 14 | -@ApiModel("็จๆท App - ๅๅ SPU ๅ้กต Request VO") | ||
| 15 | -@Data | ||
| 16 | -@EqualsAndHashCode(callSuper = true) | ||
| 17 | -@ToString(callSuper = true) | ||
| 18 | -public class AppProductSpuPageReqVO extends PageParam { | ||
| 19 | - | ||
| 20 | - public static final String SORT_FIELD_PRICE = "price"; | ||
| 21 | - public static final String SORT_FIELD_SALES_COUNT = "salesCount"; | ||
| 22 | - | ||
| 23 | - @ApiModelProperty(value = "ๅ็ฑป็ผๅท", example = "1") | ||
| 24 | - private Long categoryId; | ||
| 25 | - | ||
| 26 | - @ApiModelProperty(value = "ๅ ณ้ฎๅญ", example = "ๅฅฝ็") | ||
| 27 | - private String keyword; | ||
| 28 | - | ||
| 29 | - @ApiModelProperty(value = "ๆๅบๅญๆฎต", example = "price", notes = "ๅ่ง AppSpuPageReqVO.SORT_FIELD_XXX ๅธธ้") | ||
| 30 | - private String sortField; | ||
| 31 | - | ||
| 32 | - @ApiModelProperty(value = "ๆๅบๆนๅผ", example = "true", notes = "true - ๅๅบ๏ผfalse - ้ๅบ") | ||
| 33 | - private Boolean sortAsc; | ||
| 34 | - | ||
| 35 | - @AssertTrue(message = "ๆๅบๅญๆฎตไธๅๆณ") | ||
| 36 | - @JsonIgnore | ||
| 37 | - public boolean isSortFieldValid() { | ||
| 38 | - if (StrUtil.isEmpty(sortField)) { | ||
| 39 | - return true; | ||
| 40 | - } | ||
| 41 | - return StrUtil.equalsAny(sortField, SORT_FIELD_PRICE, SORT_FIELD_SALES_COUNT); | ||
| 42 | - } | ||
| 43 | - | ||
| 44 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageReqVO.java deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageRespVO.java deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuRespVO.java deleted
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/brand/ProductBrandConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.product.convert.brand; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandCreateReqVO; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandRespVO; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandUpdateReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; | ||
| 8 | -import org.mapstruct.Mapper; | ||
| 9 | -import org.mapstruct.factory.Mappers; | ||
| 10 | - | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * ๅ็ Convert | ||
| 15 | - * | ||
| 16 | - * @author ่้ๆบ็ | ||
| 17 | - */ | ||
| 18 | -@Mapper | ||
| 19 | -public interface ProductBrandConvert { | ||
| 20 | - | ||
| 21 | - ProductBrandConvert INSTANCE = Mappers.getMapper(ProductBrandConvert.class); | ||
| 22 | - | ||
| 23 | - ProductBrandDO convert(ProductBrandCreateReqVO bean); | ||
| 24 | - | ||
| 25 | - ProductBrandDO convert(ProductBrandUpdateReqVO bean); | ||
| 26 | - | ||
| 27 | - ProductBrandRespVO convert(ProductBrandDO bean); | ||
| 28 | - | ||
| 29 | - List<ProductBrandRespVO> convertList(List<ProductBrandDO> list); | ||
| 30 | - | ||
| 31 | - PageResult<ProductBrandRespVO> convertPage(PageResult<ProductBrandDO> page); | ||
| 32 | - | ||
| 33 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/category/ProductCategoryConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.product.convert.category; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryCreateReqVO; | ||
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryRespVO; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryUpdateReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.app.category.vo.AppCategoryRespVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; | ||
| 8 | -import org.mapstruct.Mapper; | ||
| 9 | -import org.mapstruct.factory.Mappers; | ||
| 10 | - | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * ๅๅๅ็ฑป Convert | ||
| 15 | - * | ||
| 16 | - * @author ่้ๆบ็ | ||
| 17 | - */ | ||
| 18 | -@Mapper | ||
| 19 | -public interface ProductCategoryConvert { | ||
| 20 | - | ||
| 21 | - ProductCategoryConvert INSTANCE = Mappers.getMapper(ProductCategoryConvert.class); | ||
| 22 | - | ||
| 23 | - ProductCategoryDO convert(ProductCategoryCreateReqVO bean); | ||
| 24 | - | ||
| 25 | - ProductCategoryDO convert(ProductCategoryUpdateReqVO bean); | ||
| 26 | - | ||
| 27 | - ProductCategoryRespVO convert(ProductCategoryDO bean); | ||
| 28 | - | ||
| 29 | - List<ProductCategoryRespVO> convertList(List<ProductCategoryDO> list); | ||
| 30 | - | ||
| 31 | - List<AppCategoryRespVO> convertList03(List<ProductCategoryDO> list); | ||
| 32 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/property/ProductPropertyConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.product.convert.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyAndValueRespVO; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyCreateReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyRespVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyUpdateReqVO; | ||
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; | ||
| 10 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; | ||
| 11 | -import org.mapstruct.Mapper; | ||
| 12 | -import org.mapstruct.factory.Mappers; | ||
| 13 | - | ||
| 14 | -import java.util.List; | ||
| 15 | -import java.util.Map; | ||
| 16 | - | ||
| 17 | -/** | ||
| 18 | - * ๅฑๆง้กน Convert | ||
| 19 | - * | ||
| 20 | - * @author ่้ๆบ็ | ||
| 21 | - */ | ||
| 22 | -@Mapper | ||
| 23 | -public interface ProductPropertyConvert { | ||
| 24 | - | ||
| 25 | - ProductPropertyConvert INSTANCE = Mappers.getMapper(ProductPropertyConvert.class); | ||
| 26 | - | ||
| 27 | - ProductPropertyDO convert(ProductPropertyCreateReqVO bean); | ||
| 28 | - | ||
| 29 | - ProductPropertyDO convert(ProductPropertyUpdateReqVO bean); | ||
| 30 | - | ||
| 31 | - ProductPropertyRespVO convert(ProductPropertyDO bean); | ||
| 32 | - | ||
| 33 | - List<ProductPropertyRespVO> convertList(List<ProductPropertyDO> list); | ||
| 34 | - | ||
| 35 | - PageResult<ProductPropertyRespVO> convertPage(PageResult<ProductPropertyDO> page); | ||
| 36 | - | ||
| 37 | - default List<ProductPropertyAndValueRespVO> convertList(List<ProductPropertyDO> keys, List<ProductPropertyValueDO> values) { | ||
| 38 | - Map<Long, List<ProductPropertyValueDO>> valueMap = CollectionUtils.convertMultiMap(values, ProductPropertyValueDO::getPropertyId); | ||
| 39 | - return CollectionUtils.convertList(keys, key -> { | ||
| 40 | - ProductPropertyAndValueRespVO respVO = convert02(key); | ||
| 41 | - respVO.setValues(convertList02(valueMap.get(key.getId()))); | ||
| 42 | - return respVO; | ||
| 43 | - }); | ||
| 44 | - } | ||
| 45 | - ProductPropertyAndValueRespVO convert02(ProductPropertyDO bean); | ||
| 46 | - List<ProductPropertyAndValueRespVO.Value> convertList02(List<ProductPropertyValueDO> list); | ||
| 47 | - | ||
| 48 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/propertyvalue/ProductPropertyValueConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.product.convert.propertyvalue; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 5 | -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | ||
| 6 | -import cn.iocoder.yudao.module.product.api.property.dto.ProductPropertyValueDetailRespDTO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; | ||
| 9 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueUpdateReqVO; | ||
| 10 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; | ||
| 11 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; | ||
| 12 | -import cn.iocoder.yudao.module.product.service.property.bo.ProductPropertyValueDetailRespBO; | ||
| 13 | -import org.mapstruct.Mapper; | ||
| 14 | -import org.mapstruct.factory.Mappers; | ||
| 15 | - | ||
| 16 | -import java.util.List; | ||
| 17 | -import java.util.Map; | ||
| 18 | - | ||
| 19 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | ||
| 20 | - | ||
| 21 | -/** | ||
| 22 | - * ๅฑๆงๅผ Convert | ||
| 23 | - * | ||
| 24 | - * @author ่้ๆบ็ | ||
| 25 | - */ | ||
| 26 | -@Mapper | ||
| 27 | -public interface ProductPropertyValueConvert { | ||
| 28 | - | ||
| 29 | - ProductPropertyValueConvert INSTANCE = Mappers.getMapper(ProductPropertyValueConvert.class); | ||
| 30 | - | ||
| 31 | - ProductPropertyValueDO convert(ProductPropertyValueCreateReqVO bean); | ||
| 32 | - | ||
| 33 | - ProductPropertyValueDO convert(ProductPropertyValueUpdateReqVO bean); | ||
| 34 | - | ||
| 35 | - ProductPropertyValueRespVO convert(ProductPropertyValueDO bean); | ||
| 36 | - | ||
| 37 | - List<ProductPropertyValueRespVO> convertList(List<ProductPropertyValueDO> list); | ||
| 38 | - | ||
| 39 | - PageResult<ProductPropertyValueRespVO> convertPage(PageResult<ProductPropertyValueDO> page); | ||
| 40 | - | ||
| 41 | - default List<ProductPropertyValueDetailRespBO> convertList(List<ProductPropertyValueDO> values, List<ProductPropertyDO> keys) { | ||
| 42 | - Map<Long, ProductPropertyDO> keyMap = convertMap(keys, ProductPropertyDO::getId); | ||
| 43 | - return CollectionUtils.convertList(values, value -> { | ||
| 44 | - ProductPropertyValueDetailRespBO valueDetail = new ProductPropertyValueDetailRespBO() | ||
| 45 | - .setValueId(value.getId()).setValueName(value.getName()); | ||
| 46 | - // ่ฎพ็ฝฎๅฑๆง้กน | ||
| 47 | - MapUtils.findAndThen(keyMap, value.getPropertyId(), | ||
| 48 | - key -> valueDetail.setPropertyId(key.getId()).setPropertyName(key.getName())); | ||
| 49 | - return valueDetail; | ||
| 50 | - }); | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - List<ProductPropertyValueDetailRespDTO> convertList02(List<ProductPropertyValueDetailRespBO> list); | ||
| 54 | - | ||
| 55 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/sku/ProductSkuConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.product.convert.sku; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | -import cn.hutool.core.util.StrUtil; | ||
| 5 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO; | ||
| 6 | -import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuUpdateStockReqDTO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuOptionRespVO; | ||
| 9 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuRespVO; | ||
| 10 | -import cn.iocoder.yudao.module.product.controller.admin.spu.vo.ProductSpuDetailRespVO; | ||
| 11 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 12 | -import org.mapstruct.Mapper; | ||
| 13 | -import org.mapstruct.factory.Mappers; | ||
| 14 | - | ||
| 15 | -import java.util.*; | ||
| 16 | -import java.util.stream.Collectors; | ||
| 17 | - | ||
| 18 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | ||
| 19 | - | ||
| 20 | -/** | ||
| 21 | - * ๅๅ SKU Convert | ||
| 22 | - * | ||
| 23 | - * @author ่้ๆบ็ | ||
| 24 | - */ | ||
| 25 | -@Mapper | ||
| 26 | -public interface ProductSkuConvert { | ||
| 27 | - | ||
| 28 | - ProductSkuConvert INSTANCE = Mappers.getMapper(ProductSkuConvert.class); | ||
| 29 | - | ||
| 30 | - ProductSkuDO convert(ProductSkuCreateOrUpdateReqVO bean); | ||
| 31 | - | ||
| 32 | - ProductSkuRespVO convert(ProductSkuDO bean); | ||
| 33 | - | ||
| 34 | - List<ProductSkuRespVO> convertList(List<ProductSkuDO> list); | ||
| 35 | - | ||
| 36 | - List<ProductSkuDO> convertList06(List<ProductSkuCreateOrUpdateReqVO> list); | ||
| 37 | - | ||
| 38 | - default List<ProductSkuDO> convertList06(List<ProductSkuCreateOrUpdateReqVO> list, Long spuId, String spuName) { | ||
| 39 | - List<ProductSkuDO> result = convertList06(list); | ||
| 40 | - result.forEach(item -> item.setSpuId(spuId).setSpuName(spuName)); | ||
| 41 | - return result; | ||
| 42 | - } | ||
| 43 | - | ||
| 44 | - ProductSkuRespDTO convert02(ProductSkuDO bean); | ||
| 45 | - | ||
| 46 | - List<ProductSpuDetailRespVO.Sku> convertList03(List<ProductSkuDO> list); | ||
| 47 | - | ||
| 48 | - List<ProductSkuRespDTO> convertList04(List<ProductSkuDO> list); | ||
| 49 | - | ||
| 50 | - List<ProductSkuOptionRespVO> convertList05(List<ProductSkuDO> skus); | ||
| 51 | - | ||
| 52 | - /** | ||
| 53 | - * ่ทๅพ SPU ็ๅบๅญๅๅ Map | ||
| 54 | - * | ||
| 55 | - * @param items SKU ๅบๅญๅๅ | ||
| 56 | - * @param skus SKU ๅ่กจ | ||
| 57 | - * @return SPU ็ๅบๅญๅๅ Map | ||
| 58 | - */ | ||
| 59 | - default Map<Long, Integer> convertSpuStockMap(List<ProductSkuUpdateStockReqDTO.Item> items, | ||
| 60 | - List<ProductSkuDO> skus) { | ||
| 61 | - Map<Long, Long> skuIdAndSpuIdMap = convertMap(skus, ProductSkuDO::getId, ProductSkuDO::getSpuId); // SKU ไธ SKU ็ผๅท็ Map ๅ ณ็ณป | ||
| 62 | - Map<Long, Integer> spuIdAndStockMap = new HashMap<>(); // SPU ็ๅบๅญๅๅ Map ๅ ณ็ณป | ||
| 63 | - items.forEach(item -> { | ||
| 64 | - Long spuId = skuIdAndSpuIdMap.get(item.getId()); | ||
| 65 | - if (spuId == null) { | ||
| 66 | - return; | ||
| 67 | - } | ||
| 68 | - Integer stock = spuIdAndStockMap.getOrDefault(spuId, 0) + item.getIncrCount(); | ||
| 69 | - spuIdAndStockMap.put(spuId, stock); | ||
| 70 | - }); | ||
| 71 | - return spuIdAndStockMap; | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - default Collection<Long> convertPropertyValueIds(List<ProductSkuDO> list) { | ||
| 75 | - if (CollUtil.isEmpty(list)) { | ||
| 76 | - return new HashSet<>(); | ||
| 77 | - } | ||
| 78 | - return list.stream().filter(item -> item.getProperties() != null) | ||
| 79 | - .flatMap(p -> p.getProperties().stream()) // ้ๅๅคไธช Property ๅฑๆง | ||
| 80 | - .map(ProductSkuDO.Property::getValueId) // ๅฐๆฏไธช Property ่ฝฌๆขๆๅฏนๅบ็ propertyId๏ผๆๅๅฝขๆ้ๅ | ||
| 81 | - .collect(Collectors.toSet()); | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | - default String buildPropertyKey(ProductSkuDO bean) { | ||
| 85 | - if (CollUtil.isEmpty(bean.getProperties())) { | ||
| 86 | - return StrUtil.EMPTY; | ||
| 87 | - } | ||
| 88 | - List<ProductSkuDO.Property> properties = new ArrayList<>(bean.getProperties()); | ||
| 89 | - properties.sort(Comparator.comparing(ProductSkuDO.Property::getValueId)); | ||
| 90 | - return properties.stream().map(m -> String.valueOf(m.getValueId())).collect(Collectors.joining()); | ||
| 91 | - } | ||
| 92 | - | ||
| 93 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/spu/ProductSpuConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.product.convert.spu; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 5 | -import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueDetailRespVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; | ||
| 8 | -import cn.iocoder.yudao.module.product.controller.app.property.vo.value.AppProductPropertyValueDetailRespVO; | ||
| 9 | -import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuDetailRespVO; | ||
| 10 | -import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuPageReqVO; | ||
| 11 | -import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuPageItemRespVO; | ||
| 12 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 13 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 14 | -import cn.iocoder.yudao.module.product.service.property.bo.ProductPropertyValueDetailRespBO; | ||
| 15 | -import org.mapstruct.Mapper; | ||
| 16 | -import org.mapstruct.factory.Mappers; | ||
| 17 | - | ||
| 18 | -import java.util.ArrayList; | ||
| 19 | -import java.util.List; | ||
| 20 | -import java.util.Map; | ||
| 21 | - | ||
| 22 | -import static cn.hutool.core.util.ObjectUtil.defaultIfNull; | ||
| 23 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | ||
| 24 | - | ||
| 25 | -/** | ||
| 26 | - * ๅๅ SPU Convert | ||
| 27 | - * | ||
| 28 | - * @author ่้ๆบ็ | ||
| 29 | - */ | ||
| 30 | -@Mapper | ||
| 31 | -public interface ProductSpuConvert { | ||
| 32 | - | ||
| 33 | - ProductSpuConvert INSTANCE = Mappers.getMapper(ProductSpuConvert.class); | ||
| 34 | - | ||
| 35 | - ProductSpuDO convert(ProductSpuCreateReqVO bean); | ||
| 36 | - | ||
| 37 | - ProductSpuDO convert(ProductSpuUpdateReqVO bean); | ||
| 38 | - | ||
| 39 | - List<ProductSpuDO> convertList(List<ProductSpuDO> list); | ||
| 40 | - | ||
| 41 | - PageResult<ProductSpuRespVO> convertPage(PageResult<ProductSpuDO> page); | ||
| 42 | - | ||
| 43 | - ProductSpuPageReqVO convert(AppProductSpuPageReqVO bean); | ||
| 44 | - | ||
| 45 | - List<ProductSpuRespDTO> convertList2(List<ProductSpuDO> list); | ||
| 46 | - | ||
| 47 | - List<ProductSpuSimpleRespVO> convertList02(List<ProductSpuDO> list); | ||
| 48 | - | ||
| 49 | - default AppProductSpuDetailRespVO convert(ProductSpuDO spu, List<ProductSkuDO> skus, | ||
| 50 | - List<ProductPropertyValueDetailRespBO> propertyValues) { | ||
| 51 | - AppProductSpuDetailRespVO spuVO = convert02(spu) | ||
| 52 | - .setSalesCount(spu.getSalesCount() + defaultIfNull(spu.getVirtualSalesCount(), 0)); | ||
| 53 | - spuVO.setSkus(convertList03(skus)); | ||
| 54 | - // ๅค็ๅๅๅฑๆง | ||
| 55 | - Map<Long, ProductPropertyValueDetailRespBO> propertyValueMap = convertMap(propertyValues, ProductPropertyValueDetailRespBO::getValueId); | ||
| 56 | - for (int i = 0; i < skus.size(); i++) { | ||
| 57 | - List<ProductSkuDO.Property> properties = skus.get(i).getProperties(); | ||
| 58 | - if (CollUtil.isEmpty(properties)) { | ||
| 59 | - continue; | ||
| 60 | - } | ||
| 61 | - AppProductSpuDetailRespVO.Sku sku = spuVO.getSkus().get(i); | ||
| 62 | - sku.setProperties(new ArrayList<>(properties.size())); | ||
| 63 | - // ้ๅๆฏไธช properties๏ผ่ฎพ็ฝฎๅฐ AppSpuDetailRespVO.Sku ไธญ | ||
| 64 | - properties.forEach(property -> { | ||
| 65 | - ProductPropertyValueDetailRespBO propertyValue = propertyValueMap.get(property.getValueId()); | ||
| 66 | - if (propertyValue == null) { | ||
| 67 | - return; | ||
| 68 | - } | ||
| 69 | - sku.getProperties().add(convert03(propertyValue)); | ||
| 70 | - }); | ||
| 71 | - } | ||
| 72 | - return spuVO; | ||
| 73 | - } | ||
| 74 | - AppProductSpuDetailRespVO convert02(ProductSpuDO spu); | ||
| 75 | - List<AppProductSpuDetailRespVO.Sku> convertList03(List<ProductSkuDO> skus); | ||
| 76 | - AppProductPropertyValueDetailRespVO convert03(ProductPropertyValueDetailRespBO propertyValue); | ||
| 77 | - | ||
| 78 | - PageResult<AppProductSpuPageItemRespVO> convertPage02(PageResult<ProductSpuDO> page); | ||
| 79 | - | ||
| 80 | - default ProductSpuDetailRespVO convert03(ProductSpuDO spu, List<ProductSkuDO> skus, | ||
| 81 | - List<ProductPropertyValueDetailRespBO> propertyValues) { | ||
| 82 | - ProductSpuDetailRespVO spuVO = convert03(spu); | ||
| 83 | - spuVO.setSkus(convertList04(skus)); | ||
| 84 | - // ๅค็ๅๅๅฑๆง | ||
| 85 | - Map<Long, ProductPropertyValueDetailRespBO> propertyValueMap = convertMap(propertyValues, ProductPropertyValueDetailRespBO::getValueId); | ||
| 86 | - for (int i = 0; i < skus.size(); i++) { | ||
| 87 | - List<ProductSkuDO.Property> properties = skus.get(i).getProperties(); | ||
| 88 | - if (CollUtil.isEmpty(properties)) { | ||
| 89 | - continue; | ||
| 90 | - } | ||
| 91 | - ProductSpuDetailRespVO.Sku sku = spuVO.getSkus().get(i); | ||
| 92 | - sku.setProperties(new ArrayList<>(properties.size())); | ||
| 93 | - // ้ๅๆฏไธช properties๏ผ่ฎพ็ฝฎๅฐ AppSpuDetailRespVO.Sku ไธญ | ||
| 94 | - properties.forEach(property -> { | ||
| 95 | - ProductPropertyValueDetailRespBO propertyValue = propertyValueMap.get(property.getValueId()); | ||
| 96 | - if (propertyValue == null) { | ||
| 97 | - return; | ||
| 98 | - } | ||
| 99 | - sku.getProperties().add(convert04(propertyValue)); | ||
| 100 | - }); | ||
| 101 | - } | ||
| 102 | - return spuVO; | ||
| 103 | - } | ||
| 104 | - ProductSpuDetailRespVO convert03(ProductSpuDO spu); | ||
| 105 | - List<ProductSpuDetailRespVO.Sku> convertList04(List<ProductSkuDO> skus); | ||
| 106 | - ProductPropertyValueDetailRespVO convert04(ProductPropertyValueDetailRespBO propertyValue); | ||
| 107 | - | ||
| 108 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/brand/ProductBrandDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.brand; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | -import lombok.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅๅ็ DO | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@TableName("product_brand") | ||
| 15 | -@Data | ||
| 16 | -@EqualsAndHashCode(callSuper = true) | ||
| 17 | -@ToString(callSuper = true) | ||
| 18 | -@Builder | ||
| 19 | -@NoArgsConstructor | ||
| 20 | -@AllArgsConstructor | ||
| 21 | -public class ProductBrandDO extends BaseDO { | ||
| 22 | - | ||
| 23 | - /** | ||
| 24 | - * ๅ็็ผๅท | ||
| 25 | - */ | ||
| 26 | - @TableId | ||
| 27 | - private Long id; | ||
| 28 | - /** | ||
| 29 | - * ๅ็ๅ็งฐ | ||
| 30 | - */ | ||
| 31 | - private String name; | ||
| 32 | - /** | ||
| 33 | - * ๅ็ๅพ็ | ||
| 34 | - */ | ||
| 35 | - private String picUrl; | ||
| 36 | - /** | ||
| 37 | - * ๅ็ๆๅบ | ||
| 38 | - */ | ||
| 39 | - private Integer sort; | ||
| 40 | - /** | ||
| 41 | - * ๅ็ๆ่ฟฐ | ||
| 42 | - */ | ||
| 43 | - private String description; | ||
| 44 | - /** | ||
| 45 | - * ็ถๆ | ||
| 46 | - * | ||
| 47 | - * ๆไธพ {@link CommonStatusEnum} | ||
| 48 | - */ | ||
| 49 | - private Integer status; | ||
| 50 | - | ||
| 51 | - // TODO ่่ฟ๏ผfirstLetter ้ฆๅญๆฏ | ||
| 52 | - | ||
| 53 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/category/ProductCategoryDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.category; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | -import lombok.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅๅ็ฑป DO | ||
| 11 | - * | ||
| 12 | - * ๅๅๅ็ฑปไธๅ ฑไธค็ฑป๏ผ | ||
| 13 | - * 1๏ผไธ็บงๅ็ฑป๏ผ{@link #parentId} ็ญไบ 0 | ||
| 14 | - * 2๏ผไบ็บง + ไธ็บงๅ็ฑป๏ผ{@link #parentId} ไธ็ญไบ 0 | ||
| 15 | - * | ||
| 16 | - * @author ่้ๆบ็ | ||
| 17 | - */ | ||
| 18 | -@TableName("product_category") | ||
| 19 | -@Data | ||
| 20 | -@EqualsAndHashCode(callSuper = true) | ||
| 21 | -@ToString(callSuper = true) | ||
| 22 | -@Builder | ||
| 23 | -@NoArgsConstructor | ||
| 24 | -@AllArgsConstructor | ||
| 25 | -public class ProductCategoryDO extends BaseDO { | ||
| 26 | - | ||
| 27 | - /** | ||
| 28 | - * ็ถๅ็ฑป็ผๅท - ๆ นๅ็ฑป | ||
| 29 | - */ | ||
| 30 | - public static final Long PARENT_ID_NULL = 0L; | ||
| 31 | - | ||
| 32 | - /** | ||
| 33 | - * ๅ็ฑป็ผๅท | ||
| 34 | - */ | ||
| 35 | - @TableId | ||
| 36 | - private Long id; | ||
| 37 | - /** | ||
| 38 | - * ็ถๅ็ฑป็ผๅท | ||
| 39 | - */ | ||
| 40 | - private Long parentId; | ||
| 41 | - /** | ||
| 42 | - * ๅ็ฑปๅ็งฐ | ||
| 43 | - */ | ||
| 44 | - private String name; | ||
| 45 | - /** | ||
| 46 | - * ๅ็ฑปๅพ็ | ||
| 47 | - * | ||
| 48 | - * ไธ็บงๅ็ฑป๏ผๆจ่ 200 x 100 ๅ่พจ็ | ||
| 49 | - * ไบ็บง + ไธ็บงๅ็ฑป๏ผๆจ่ 100 x 100 ๅ่พจ็ | ||
| 50 | - */ | ||
| 51 | - private String picUrl; | ||
| 52 | - /** | ||
| 53 | - * ๅ็ฑปๆๅบ | ||
| 54 | - */ | ||
| 55 | - private Integer sort; | ||
| 56 | - /** | ||
| 57 | - * ๅ็ฑปๆ่ฟฐ | ||
| 58 | - */ | ||
| 59 | - private String description; | ||
| 60 | - /** | ||
| 61 | - * ๅผๅฏ็ถๆ | ||
| 62 | - * | ||
| 63 | - * ๆไธพ {@link CommonStatusEnum} | ||
| 64 | - */ | ||
| 65 | - private Integer status; | ||
| 66 | - | ||
| 67 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/comment/ProductCommentDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.comment; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 5 | -import cn.iocoder.yudao.module.product.enums.comment.ProductCommentAuditStatusEnum; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 7 | -import com.baomidou.mybatisplus.annotation.TableField; | ||
| 8 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 9 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 10 | -import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | ||
| 11 | -import lombok.*; | ||
| 12 | - | ||
| 13 | -import java.time.LocalDateTime; | ||
| 14 | -import java.util.List; | ||
| 15 | - | ||
| 16 | -/** | ||
| 17 | - * ๅๅ่ฏ่ฎบ DO | ||
| 18 | - * | ||
| 19 | - * @author ่้ๆบ็ | ||
| 20 | - */ | ||
| 21 | -@TableName("product_comment") | ||
| 22 | -@KeySequence("product_comment_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 23 | -@Data | ||
| 24 | -@EqualsAndHashCode(callSuper = true) | ||
| 25 | -@ToString(callSuper = true) | ||
| 26 | -@Builder | ||
| 27 | -@NoArgsConstructor | ||
| 28 | -@AllArgsConstructor | ||
| 29 | -public class ProductCommentDO extends BaseDO { | ||
| 30 | - | ||
| 31 | - /** | ||
| 32 | - * ่ฏ่ฎบ็ผๅท๏ผไธป้ฎ่ชๅข | ||
| 33 | - */ | ||
| 34 | - @TableId | ||
| 35 | - private Long id; | ||
| 36 | - /** | ||
| 37 | - * ๅๅ SPU ็ผๅท | ||
| 38 | - * | ||
| 39 | - * ๅ ณ่ {@link ProductSpuDO#getId()} | ||
| 40 | - */ | ||
| 41 | - private Long spuId; | ||
| 42 | - /** | ||
| 43 | - * ไบคๆ่ฎขๅ็ผๅท | ||
| 44 | - * | ||
| 45 | - * ๅ ณ่ TradeOrderDO ็ id ็ผๅท | ||
| 46 | - */ | ||
| 47 | - private Long orderId; | ||
| 48 | - /** | ||
| 49 | - * ไบคๆ่ฎขๅ้กน็ผๅท | ||
| 50 | - * | ||
| 51 | - * ๅ ณ่ TradeOrderItemDO ็ id ็ผๅท | ||
| 52 | - */ | ||
| 53 | - private Long orderItemId; | ||
| 54 | - /** | ||
| 55 | - * ๅฎกๆ ธ็ถๆ | ||
| 56 | - * | ||
| 57 | - * ๆไธพ {@link ProductCommentAuditStatusEnum} | ||
| 58 | - */ | ||
| 59 | - private Integer auditStatus; | ||
| 60 | - | ||
| 61 | - /** | ||
| 62 | - * ็จๆท็ผๅท | ||
| 63 | - * | ||
| 64 | - * ๅ ณ่ MemberUserDO ็ id ็ผๅท | ||
| 65 | - */ | ||
| 66 | - private Long userId; | ||
| 67 | - /** | ||
| 68 | - * ็จๆท IP | ||
| 69 | - */ | ||
| 70 | - private String userIp; | ||
| 71 | - /** | ||
| 72 | - * ๆฏๅฆๅฟๅ | ||
| 73 | - */ | ||
| 74 | - private Boolean anonymous; | ||
| 75 | - /** | ||
| 76 | - * ่ฏ่ฎบๅ ๅฎน | ||
| 77 | - */ | ||
| 78 | - private String content; | ||
| 79 | - /** | ||
| 80 | - * ่ฏ่ฎบๅพ็ๅฐๅๆฐ็ป | ||
| 81 | - */ | ||
| 82 | - @TableField(typeHandler = JacksonTypeHandler.class) | ||
| 83 | - private List<String> picUrls; | ||
| 84 | - /** | ||
| 85 | - * ๆ่ฟฐ็ธ็ฌฆๆ็บง | ||
| 86 | - * | ||
| 87 | - * 1-5 ๆ | ||
| 88 | - */ | ||
| 89 | - private Integer descriptionScore; | ||
| 90 | - /** | ||
| 91 | - * ๅๅ่ฏ่ฎบๆ็บง | ||
| 92 | - * | ||
| 93 | - * 1-5 ๆ | ||
| 94 | - */ | ||
| 95 | - private Integer productScore; | ||
| 96 | - /** | ||
| 97 | - * ๆๅก่ฏ่ฎบๆ็บง | ||
| 98 | - * | ||
| 99 | - * 1-5 ๆ | ||
| 100 | - */ | ||
| 101 | - private Integer serviceScore; | ||
| 102 | - /** | ||
| 103 | - * ็ฉๆต่ฏ่ฎบๆ็บง | ||
| 104 | - * | ||
| 105 | - * 1-5 ๆ | ||
| 106 | - */ | ||
| 107 | - private Integer expressComment; | ||
| 108 | - | ||
| 109 | - /** | ||
| 110 | - * ๅๅฎถๆฏๅฆๅๅค | ||
| 111 | - */ | ||
| 112 | - private Boolean replied; | ||
| 113 | - /** | ||
| 114 | - * ๅๅฎถๅๅคๅ ๅฎน | ||
| 115 | - */ | ||
| 116 | - private String replyContent; | ||
| 117 | - /** | ||
| 118 | - * ๅๅฎถๅๅคๆถ้ด | ||
| 119 | - */ | ||
| 120 | - private LocalDateTime replyTime; | ||
| 121 | - | ||
| 122 | - /** | ||
| 123 | - * ๆ็จ็่ฎกๆฐ | ||
| 124 | - * | ||
| 125 | - * ๅ ถไป็จๆท็ๅฐ่ฏ่ฎบๆถ๏ผๅฏ็นๅปใๆ็จใๆ้ฎ | ||
| 126 | - */ | ||
| 127 | - private Integer usefulCount; | ||
| 128 | - | ||
| 129 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryTemplateDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.delivery; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | -import lombok.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ้ ้ๆจกๆฟ SPU DO | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@TableName("delivery_template") | ||
| 15 | -@KeySequence("delivery_template_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 16 | -@Data | ||
| 17 | -@EqualsAndHashCode(callSuper = true) | ||
| 18 | -@ToString(callSuper = true) | ||
| 19 | -@Builder | ||
| 20 | -@NoArgsConstructor | ||
| 21 | -@AllArgsConstructor | ||
| 22 | -public class DeliveryTemplateDO extends BaseDO { | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ็ผๅท๏ผ่ชๅข | ||
| 26 | - */ | ||
| 27 | - @TableId | ||
| 28 | - private Long id; | ||
| 29 | - | ||
| 30 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/favorite/ProductFavoriteDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.favorite; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 7 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 8 | -import lombok.*; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * ๅๅๆถ่ DO | ||
| 12 | - * | ||
| 13 | - * @author ่้ๆบ็ | ||
| 14 | - */ | ||
| 15 | -@TableName("product_favorite") | ||
| 16 | -@KeySequence("product_favorite_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 17 | -@Data | ||
| 18 | -@EqualsAndHashCode(callSuper = true) | ||
| 19 | -@ToString(callSuper = true) | ||
| 20 | -@Builder | ||
| 21 | -@NoArgsConstructor | ||
| 22 | -@AllArgsConstructor | ||
| 23 | -public class ProductFavoriteDO extends BaseDO { | ||
| 24 | - | ||
| 25 | - /** | ||
| 26 | - * ็ผๅท๏ผไธป้ฎ่ชๅข | ||
| 27 | - */ | ||
| 28 | - @TableId | ||
| 29 | - private Long id; | ||
| 30 | - /** | ||
| 31 | - * ็จๆท็ผๅท | ||
| 32 | - * | ||
| 33 | - * ๅ ณ่ MemberUserDO ็ id ็ผๅท | ||
| 34 | - */ | ||
| 35 | - private Long userId; | ||
| 36 | - /** | ||
| 37 | - * ๅๅ SPU ็ผๅท | ||
| 38 | - * | ||
| 39 | - * ๅ ณ่ {@link ProductSpuDO#getId()} | ||
| 40 | - */ | ||
| 41 | - private Long spuId; | ||
| 42 | - | ||
| 43 | - // TODO ่่ฟ๏ผtype 1 ๆถ่๏ผ2 ็น่ต | ||
| 44 | - | ||
| 45 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/group/ProductGroupBindDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.group; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 7 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 8 | -import lombok.*; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * ๅๅๅ็ป็็ปๅฎ DO | ||
| 12 | - * | ||
| 13 | - * @author ่้ๆบ็ | ||
| 14 | - */ | ||
| 15 | -@TableName("product_group_bind") | ||
| 16 | -@KeySequence("product_group_bind_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 17 | -@Data | ||
| 18 | -@EqualsAndHashCode(callSuper = true) | ||
| 19 | -@ToString(callSuper = true) | ||
| 20 | -@Builder | ||
| 21 | -@NoArgsConstructor | ||
| 22 | -@AllArgsConstructor | ||
| 23 | -public class ProductGroupBindDO extends BaseDO { | ||
| 24 | - | ||
| 25 | - /** | ||
| 26 | - * ็ผๅท๏ผ่ชๅข | ||
| 27 | - */ | ||
| 28 | - @TableId | ||
| 29 | - private Long id; | ||
| 30 | - /** | ||
| 31 | - * ๅๅๅ็ป็ผๅท | ||
| 32 | - * | ||
| 33 | - * ๅ ณ่ {@link ProductGroupDO#getId()} | ||
| 34 | - */ | ||
| 35 | - private Long groupId; | ||
| 36 | - /** | ||
| 37 | - * ๅๅ SPU ็ผๅท | ||
| 38 | - * | ||
| 39 | - * ๅ ณ่ {@link ProductSpuDO#getId()} | ||
| 40 | - */ | ||
| 41 | - private Long spuId; | ||
| 42 | - | ||
| 43 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/group/ProductGroupDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.group; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 5 | -import cn.iocoder.yudao.module.product.enums.group.ProductGroupStyleEnum; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 7 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 8 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 9 | -import lombok.*; | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * ๅๅๅ็ป DO | ||
| 13 | - * | ||
| 14 | - * @author ่้ๆบ็ | ||
| 15 | - */ | ||
| 16 | -@TableName("product_group") | ||
| 17 | -@KeySequence("product_group_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 18 | -@Data | ||
| 19 | -@EqualsAndHashCode(callSuper = true) | ||
| 20 | -@ToString(callSuper = true) | ||
| 21 | -@Builder | ||
| 22 | -@NoArgsConstructor | ||
| 23 | -@AllArgsConstructor | ||
| 24 | -public class ProductGroupDO extends BaseDO { | ||
| 25 | - | ||
| 26 | - /** | ||
| 27 | - * ๅๅๅ็ป็ผๅท๏ผ่ชๅข | ||
| 28 | - */ | ||
| 29 | - @TableId | ||
| 30 | - private Long id; | ||
| 31 | - /** | ||
| 32 | - * ๅ็ปๅ็งฐ | ||
| 33 | - */ | ||
| 34 | - private String name; | ||
| 35 | - /** | ||
| 36 | - * ็ถๆ | ||
| 37 | - * | ||
| 38 | - * ๆไธพ {@link CommonStatusEnum} | ||
| 39 | - */ | ||
| 40 | - private Integer status; | ||
| 41 | - /** | ||
| 42 | - * ๅๅๆฐ้ | ||
| 43 | - */ | ||
| 44 | - private Integer count; | ||
| 45 | - /** | ||
| 46 | - * ๆๅบ | ||
| 47 | - */ | ||
| 48 | - private Integer sort; | ||
| 49 | - /** | ||
| 50 | - * ้ฃๆ ผ๏ผ็จไบ APP ้ฆ้กตๅฑ็คบๅๅ็ๆ ทๅผ | ||
| 51 | - * | ||
| 52 | - * ๆไธพ {@link ProductGroupStyleEnum} | ||
| 53 | - */ | ||
| 54 | - private Integer style; | ||
| 55 | - /** | ||
| 56 | - * ๆฏๅฆ้ป่ฎค | ||
| 57 | - * | ||
| 58 | - * true - ็ณป็ป้ป่ฎค๏ผไธๅ ่ฎธๅ ้ค | ||
| 59 | - * false - ่ชๅฎไน๏ผๅ ่ฎธๅ ้ค | ||
| 60 | - */ | ||
| 61 | - private Boolean defaulted; | ||
| 62 | - | ||
| 63 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/property/ProductPropertyDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | -import lombok.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅๅฑๆง้กน DO | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@TableName("product_property") | ||
| 15 | -@KeySequence("product_property_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 16 | -@Data | ||
| 17 | -@EqualsAndHashCode(callSuper = true) | ||
| 18 | -@ToString(callSuper = true) | ||
| 19 | -@Builder | ||
| 20 | -@NoArgsConstructor | ||
| 21 | -@AllArgsConstructor | ||
| 22 | -public class ProductPropertyDO extends BaseDO { | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ไธป้ฎ | ||
| 26 | - */ | ||
| 27 | - @TableId | ||
| 28 | - private Long id; | ||
| 29 | - /** | ||
| 30 | - * ๅ็งฐ | ||
| 31 | - */ | ||
| 32 | - private String name; | ||
| 33 | - /** | ||
| 34 | - * ๅคๆณจ | ||
| 35 | - */ | ||
| 36 | - private String remark; | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/property/ProductPropertyValueDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | -import lombok.*; | ||
| 8 | - | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * ๅๅๅฑๆงๅผ DO | ||
| 12 | - * | ||
| 13 | - * @author ่้ๆบ็ | ||
| 14 | - */ | ||
| 15 | -@TableName("product_property_value") | ||
| 16 | -@KeySequence("product_property_value_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 17 | -@Data | ||
| 18 | -@EqualsAndHashCode(callSuper = true) | ||
| 19 | -@ToString(callSuper = true) | ||
| 20 | -@Builder | ||
| 21 | -@NoArgsConstructor | ||
| 22 | -@AllArgsConstructor | ||
| 23 | -public class ProductPropertyValueDO extends BaseDO { | ||
| 24 | - | ||
| 25 | - /** | ||
| 26 | - * ไธป้ฎ | ||
| 27 | - */ | ||
| 28 | - @TableId | ||
| 29 | - private Long id; | ||
| 30 | - /** | ||
| 31 | - * ๅฑๆง้กน็็ผๅท | ||
| 32 | - * | ||
| 33 | - * ๅ ณ่ {@link ProductPropertyDO#getId()} | ||
| 34 | - */ | ||
| 35 | - private Long propertyId; | ||
| 36 | - /** | ||
| 37 | - * ๅ็งฐ | ||
| 38 | - */ | ||
| 39 | - private String name; | ||
| 40 | - /** | ||
| 41 | - * ๅคๆณจ | ||
| 42 | - * | ||
| 43 | - */ | ||
| 44 | - private String remark; | ||
| 45 | - | ||
| 46 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/search/ProductHotSearchDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.search; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | -import lombok.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * ๅๅ็ญๆๅ ณ้ฎๅญ DO | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@TableName("product_hot_search") | ||
| 15 | -@KeySequence("product_hot_search_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 16 | -@Data | ||
| 17 | -@EqualsAndHashCode(callSuper = true) | ||
| 18 | -@ToString(callSuper = true) | ||
| 19 | -@Builder | ||
| 20 | -@NoArgsConstructor | ||
| 21 | -@AllArgsConstructor | ||
| 22 | -public class ProductHotSearchDO extends BaseDO { | ||
| 23 | - | ||
| 24 | - /** | ||
| 25 | - * ็ผๅท๏ผไธป้ฎ่ชๅข | ||
| 26 | - */ | ||
| 27 | - @TableId | ||
| 28 | - private Long id; | ||
| 29 | - /** | ||
| 30 | - * ๅ ณ้ฎๅญ | ||
| 31 | - */ | ||
| 32 | - private String name; | ||
| 33 | - /** | ||
| 34 | - * ๅ ๅฎน | ||
| 35 | - */ | ||
| 36 | - private String content; | ||
| 37 | - | ||
| 38 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/shop/ShopDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.shop; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 5 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 6 | -import lombok.*; | ||
| 7 | - | ||
| 8 | -// TODO ่่ฟ๏ผๅพ ่ฎพ่ฎก | ||
| 9 | -/** | ||
| 10 | - * ๅบ้บ DO | ||
| 11 | - * | ||
| 12 | - * @author ่้ๆบ็ | ||
| 13 | - */ | ||
| 14 | -@TableName("shop") | ||
| 15 | -@KeySequence("shop_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 16 | -@Data | ||
| 17 | -@EqualsAndHashCode(callSuper = true) | ||
| 18 | -@ToString(callSuper = true) | ||
| 19 | -@Builder | ||
| 20 | -@NoArgsConstructor | ||
| 21 | -@AllArgsConstructor | ||
| 22 | -public class ShopDO extends BaseDO { | ||
| 23 | - | ||
| 24 | - private Long id; | ||
| 25 | - | ||
| 26 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/sku/ProductSkuDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.sku; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 4 | -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | ||
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 6 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; | ||
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | ||
| 9 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 10 | -import com.baomidou.mybatisplus.annotation.TableField; | ||
| 11 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 12 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 13 | -import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler; | ||
| 14 | -import lombok.*; | ||
| 15 | - | ||
| 16 | -import java.util.List; | ||
| 17 | - | ||
| 18 | -/** | ||
| 19 | - * ๅๅ SKU DO | ||
| 20 | - * | ||
| 21 | - * @author ่้ๆบ็ | ||
| 22 | - */ | ||
| 23 | -@TableName(value = "product_sku",autoResultMap = true) | ||
| 24 | -@KeySequence("product_sku_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 25 | -@Data | ||
| 26 | -@EqualsAndHashCode(callSuper = true) | ||
| 27 | -@ToString(callSuper = true) | ||
| 28 | -@Builder | ||
| 29 | -@NoArgsConstructor | ||
| 30 | -@AllArgsConstructor | ||
| 31 | -public class ProductSkuDO extends BaseDO { | ||
| 32 | - | ||
| 33 | - /** | ||
| 34 | - * ๅๅ SKU ็ผๅท๏ผ่ชๅข | ||
| 35 | - */ | ||
| 36 | - @TableId | ||
| 37 | - private Long id; | ||
| 38 | - /** | ||
| 39 | - * SPU ็ผๅท | ||
| 40 | - * <p> | ||
| 41 | - * ๅ ณ่ {@link ProductSpuDO#getId()} | ||
| 42 | - */ | ||
| 43 | - private Long spuId; | ||
| 44 | - /** | ||
| 45 | - * SPU ๅๅญ | ||
| 46 | - * | ||
| 47 | - * ๅไฝ {@link ProductSkuDO#getSpuName()} | ||
| 48 | - */ | ||
| 49 | - private String spuName; | ||
| 50 | - /** | ||
| 51 | - * ๅฑๆงๆฐ็ป๏ผJSON ๆ ผๅผ | ||
| 52 | - */ | ||
| 53 | - @TableField(typeHandler = PropertyTypeHandler.class) | ||
| 54 | - private List<Property> properties; | ||
| 55 | - /** | ||
| 56 | - * ้ๅฎไปทๆ ผ๏ผๅไฝ๏ผๅ | ||
| 57 | - */ | ||
| 58 | - private Integer price; | ||
| 59 | - /** | ||
| 60 | - * ๅธๅบไปท๏ผๅไฝ๏ผๅ | ||
| 61 | - */ | ||
| 62 | - private Integer marketPrice; | ||
| 63 | - /** | ||
| 64 | - * ๆๆฌไปท๏ผๅไฝ๏ผๅ | ||
| 65 | - */ | ||
| 66 | - private Integer costPrice; | ||
| 67 | - /** | ||
| 68 | - * SKU ็ๆกๅฝข็ | ||
| 69 | - */ | ||
| 70 | - private String barCode; | ||
| 71 | - /** | ||
| 72 | - * ๅพ็ๅฐๅ | ||
| 73 | - */ | ||
| 74 | - private String picUrl; | ||
| 75 | - /** | ||
| 76 | - * SKU ็ถๆ | ||
| 77 | - * <p> | ||
| 78 | - * ๆไธพ {@link CommonStatusEnum} | ||
| 79 | - */ | ||
| 80 | - private Integer status; | ||
| 81 | - /** | ||
| 82 | - * ๅบๅญ | ||
| 83 | - */ | ||
| 84 | - private Integer stock; | ||
| 85 | - /** | ||
| 86 | - * ้ข่ญฆ้ขๅญ | ||
| 87 | - */ | ||
| 88 | - private Integer warnStock; | ||
| 89 | - /** | ||
| 90 | - * ๅๅ้้๏ผๅไฝ๏ผkg ๅๅ | ||
| 91 | - */ | ||
| 92 | - private Double weight; | ||
| 93 | - /** | ||
| 94 | - * ๅๅไฝ็งฏ๏ผๅไฝ๏ผm^3 ๅนณ็ฑณ | ||
| 95 | - */ | ||
| 96 | - private Double volume; | ||
| 97 | - | ||
| 98 | - /** | ||
| 99 | - * ๅๅๅฑๆง | ||
| 100 | - */ | ||
| 101 | - @Data | ||
| 102 | - @NoArgsConstructor | ||
| 103 | - @AllArgsConstructor | ||
| 104 | - public static class Property { | ||
| 105 | - | ||
| 106 | - /** | ||
| 107 | - * ๅฑๆง็ผๅท | ||
| 108 | - * <p> | ||
| 109 | - * ๅ ณ่ {@link ProductPropertyDO#getId()} | ||
| 110 | - */ | ||
| 111 | - private Long propertyId; | ||
| 112 | - /** | ||
| 113 | - * ๅฑๆงๅผ็ผๅท | ||
| 114 | - * <p> | ||
| 115 | - * ๅ ณ่ {@link ProductPropertyValueDO#getId()} | ||
| 116 | - */ | ||
| 117 | - private Long valueId; | ||
| 118 | - | ||
| 119 | - } | ||
| 120 | - | ||
| 121 | - // TODO @่่ฟ๏ผๅฏไปฅๆพไธไบๆฐ็ๆ่ทฏ | ||
| 122 | - public static class PropertyTypeHandler extends AbstractJsonTypeHandler<Object> { | ||
| 123 | - | ||
| 124 | - @Override | ||
| 125 | - protected Object parse(String json) { | ||
| 126 | - return JsonUtils.parseArray(json, Property.class); | ||
| 127 | - } | ||
| 128 | - | ||
| 129 | - @Override | ||
| 130 | - protected String toJson(Object obj) { | ||
| 131 | - return JsonUtils.toJsonString(obj); | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | -} | ||
| 137 | - |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.dataobject.spu; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | ||
| 4 | -import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; | ||
| 5 | -import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; | ||
| 6 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | ||
| 7 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuSpecTypeEnum; | ||
| 8 | -import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; | ||
| 9 | -import com.baomidou.mybatisplus.annotation.KeySequence; | ||
| 10 | -import com.baomidou.mybatisplus.annotation.TableField; | ||
| 11 | -import com.baomidou.mybatisplus.annotation.TableId; | ||
| 12 | -import com.baomidou.mybatisplus.annotation.TableName; | ||
| 13 | -import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | ||
| 14 | -import lombok.*; | ||
| 15 | - | ||
| 16 | -import java.util.List; | ||
| 17 | - | ||
| 18 | -/** | ||
| 19 | - * ๅๅ SPU DO | ||
| 20 | - * | ||
| 21 | - * @author ่้ๆบ็ | ||
| 22 | - */ | ||
| 23 | -@TableName(value = "product_spu", autoResultMap = true) | ||
| 24 | -@KeySequence("product_spu_seq") // ็จไบ OracleใPostgreSQLใKingbaseใDB2ใH2 ๆฐๆฎๅบ็ไธป้ฎ่ชๅขใๅฆๆๆฏ MySQL ็ญๆฐๆฎๅบ๏ผๅฏไธๅใ | ||
| 25 | -@Data | ||
| 26 | -@EqualsAndHashCode(callSuper = true) | ||
| 27 | -@ToString(callSuper = true) | ||
| 28 | -@Builder | ||
| 29 | -@NoArgsConstructor | ||
| 30 | -@AllArgsConstructor | ||
| 31 | -public class ProductSpuDO extends BaseDO { | ||
| 32 | - | ||
| 33 | - /** | ||
| 34 | - * ๅๅ SPU ็ผๅท๏ผ่ชๅข | ||
| 35 | - */ | ||
| 36 | - @TableId | ||
| 37 | - private Long id; | ||
| 38 | - | ||
| 39 | - // ========== ๅบๆฌไฟกๆฏ ========= | ||
| 40 | - | ||
| 41 | - /** | ||
| 42 | - * ๅๅๅ็งฐ | ||
| 43 | - */ | ||
| 44 | - private String name; | ||
| 45 | - /** | ||
| 46 | - * ๅๅ็ผ็ | ||
| 47 | - */ | ||
| 48 | - private String code; | ||
| 49 | - /** | ||
| 50 | - * ไฟ้่ฏญ | ||
| 51 | - */ | ||
| 52 | - private String sellPoint; | ||
| 53 | - /** | ||
| 54 | - * ๅๅ่ฏฆๆ | ||
| 55 | - */ | ||
| 56 | - private String description; | ||
| 57 | - /** | ||
| 58 | - * ๅๅๅ็ฑป็ผๅท | ||
| 59 | - * | ||
| 60 | - * ๅ ณ่ {@link ProductCategoryDO#getId()} | ||
| 61 | - */ | ||
| 62 | - private Long categoryId; | ||
| 63 | - /** | ||
| 64 | - * ๅๅๅ็็ผๅท | ||
| 65 | - * | ||
| 66 | - * ๅ ณ่ {@link ProductBrandDO#getId()} | ||
| 67 | - */ | ||
| 68 | - private Long brandId; | ||
| 69 | - /** | ||
| 70 | - * ๅๅๅพ็็ๆฐ็ป | ||
| 71 | - * | ||
| 72 | - * 1. ็ฌฌไธๅผ ๅพ็ๅฐไฝไธบๅๅไธปๅพ๏ผๆฏๆๅๆถไธไผ ๅคๅผ ๅพ๏ผ | ||
| 73 | - * 2. ๅปบ่ฎฎไฝฟ็จๅฐบๅฏธ 800x800 ๅ็ด ไปฅไธใๅคงๅฐไธ่ถ ่ฟ 1M ็ๆญฃๆนๅฝขๅพ็๏ผ | ||
| 74 | - * 3. ่ณๅฐ 1 ๅผ ๏ผๆๅคไธไผ 10 ๅผ | ||
| 75 | - */ | ||
| 76 | - @TableField(typeHandler = JacksonTypeHandler.class) | ||
| 77 | - private List<String> picUrls; | ||
| 78 | - /** | ||
| 79 | - * ๅๅ่ง้ข | ||
| 80 | - */ | ||
| 81 | - private String videoUrl; | ||
| 82 | - | ||
| 83 | - /** | ||
| 84 | - * ๆๅบๅญๆฎต | ||
| 85 | - */ | ||
| 86 | - private Integer sort; | ||
| 87 | - /** | ||
| 88 | - * ๅๅ็ถๆ | ||
| 89 | - * | ||
| 90 | - * ๆไธพ {@link ProductSpuStatusEnum} | ||
| 91 | - */ | ||
| 92 | - private Integer status; | ||
| 93 | - | ||
| 94 | - // ========== SKU ็ธๅ ณๅญๆฎต ========= | ||
| 95 | - | ||
| 96 | - /** | ||
| 97 | - * ่งๆ ผ็ฑปๅ | ||
| 98 | - * | ||
| 99 | - * ๆไธพ {@link ProductSpuSpecTypeEnum} | ||
| 100 | - */ | ||
| 101 | - private Integer specType; | ||
| 102 | - /** | ||
| 103 | - * ๆๅฐไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ | ||
| 104 | - * | ||
| 105 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuDO#getPrice()} ๆๅฐๅผ | ||
| 106 | - */ | ||
| 107 | - private Integer minPrice; | ||
| 108 | - /** | ||
| 109 | - * ๆๅคงไปทๆ ผ๏ผๅไฝไฝฟ็จ๏ผๅ | ||
| 110 | - * | ||
| 111 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuDO#getPrice()} ๆๅคงๅผ | ||
| 112 | - */ | ||
| 113 | - private Integer maxPrice; | ||
| 114 | - /** | ||
| 115 | - * ๅธๅบไปท๏ผๅไฝไฝฟ็จ๏ผๅ | ||
| 116 | - * | ||
| 117 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuDO#getMarketPrice()} ๆๅคงๅผ | ||
| 118 | - */ | ||
| 119 | - private Integer marketPrice; | ||
| 120 | - /** | ||
| 121 | - * ๆปๅบๅญ | ||
| 122 | - * | ||
| 123 | - * ๅบไบๅ ถๅฏนๅบ็ {@link ProductSkuDO#getStock()} ๆฑๅ | ||
| 124 | - */ | ||
| 125 | - private Integer totalStock; | ||
| 126 | - /** | ||
| 127 | - * ๆฏๅฆๅฑ็คบๅบๅญ | ||
| 128 | - */ | ||
| 129 | - private Boolean showStock; | ||
| 130 | - | ||
| 131 | - // ========== ็ป่ฎก็ธๅ ณๅญๆฎต ========= | ||
| 132 | - | ||
| 133 | - /** | ||
| 134 | - * ๅๅ้้ | ||
| 135 | - */ | ||
| 136 | - private Integer salesCount; | ||
| 137 | - /** | ||
| 138 | - * ่ๆ้้ | ||
| 139 | - */ | ||
| 140 | - private Integer virtualSalesCount; | ||
| 141 | - /** | ||
| 142 | - * ๅๅ็นๅป้ | ||
| 143 | - */ | ||
| 144 | - private Integer clickCount; | ||
| 145 | - | ||
| 146 | - // ========== ็ฉๆต็ธๅ ณๅญๆฎต ========= | ||
| 147 | - | ||
| 148 | - // TODO ่่ฟ๏ผ็จๅๅฎๅ็ฉๆต็ๅญๆฎต | ||
| 149 | -// /** | ||
| 150 | -// * ้ ้ๆนๅผ | ||
| 151 | -// * | ||
| 152 | -// * ๆไธพ {@link DeliveryModeEnum} | ||
| 153 | -// */ | ||
| 154 | -// private Integer deliveryMode; | ||
| 155 | -// /** | ||
| 156 | -// * ้ ็ฝฎๆจกๆฟ็ผๅท | ||
| 157 | -// * | ||
| 158 | -// * ๅ ณ่ {@link DeliveryTemplateDO#getId()} | ||
| 159 | -// */ | ||
| 160 | -// private Long deliveryTemplateId; | ||
| 161 | - | ||
| 162 | - // TODO ========== ๅพ ๅฎๅญๆฎต๏ผyv ========= | ||
| 163 | - // TODO vip_price ไผๅไปทๆ ผ | ||
| 164 | - // TODO postage ้ฎ่ดน | ||
| 165 | - // TODO is_postage ๆฏๅฆๅ ้ฎ | ||
| 166 | - // TODO unit_name ๅไฝ | ||
| 167 | - // TODO is_new ๅๆทๆฏๅฆไปฃ็ | ||
| 168 | - // TODO give_integral ่ทๅพ็งฏๅ | ||
| 169 | - // TODO is_integral ๆฏๅผๅฏ็งฏๅๅ ๆข | ||
| 170 | - // TODO integral ๆ้็งฏๅ | ||
| 171 | - // TODO is_seckill ็งๆ็ถๆ | ||
| 172 | - // TODO is_bargain ็ ไปท็ถๆ | ||
| 173 | - // TODO code_path ไบงๅไบ็ปด็ ๅฐๅ | ||
| 174 | - // TODO is_sub ๆฏๅฆๅไฝฃ | ||
| 175 | - | ||
| 176 | - // TODO โโ ่่ฟ โโ ็่ตทๆฅ่ตฐๅ็ปๆดๅ้๏ผ | ||
| 177 | - // TODO is_hot ๆฏๅฆ็ญๅ | ||
| 178 | - // TODO is_benefit ๆฏๅฆไผๆ | ||
| 179 | - // TODO is_best ๆฏๅฆ็ฒพๅ | ||
| 180 | - // TODO is_new ๆฏๅฆๆฐๅ | ||
| 181 | - // TODO is_good ๆฏๅฆไผๅๆจ่ | ||
| 182 | - | ||
| 183 | - // TODO ========== ๅพ ๅฎๅญๆฎต๏ผcf ========= | ||
| 184 | - // TODO source_link ๆทๅฎไบฌไธ1688็ฑปๅ | ||
| 185 | - // TODO activity ๆดปๅจๆพ็คบๆๅบ 0=้ป่ฎค 1=็ง 2=็ ไปท 3=ๆผๅข | ||
| 186 | - | ||
| 187 | - // TODO ========== ๅพ ๅฎๅญๆฎต๏ผlf ========= | ||
| 188 | - | ||
| 189 | - // TODO free_shipping_type๏ผ่ฟ่ดน็ฑปๅ๏ผ1-ๅ ้ฎ๏ผ2-็ปไธ่ฟ่ดน๏ผ3-่ฟ่ดนๆจกๆฟ | ||
| 190 | - // TODO free_shipping๏ผ็ปไธ่ฟ่ดน้้ข | ||
| 191 | - // TODO free_shipping_template_id๏ผ่ฟ่ดนๆจกๆฟ | ||
| 192 | - // TODO is_commission๏ผๅ้ไฝฃ้๏ผ1-ๅผๅฏ๏ผ0-ไธๅผๅฏ๏ผfirst_ratio second_ratio three_ratio | ||
| 193 | - // TODO is_share_bouns๏ผๅบๅ่กไธๅ็บข๏ผ1-ๅผๅฏ๏ผ0-ไธๅผๅฏ๏ผregion_ratio๏ผshareholder_ratio | ||
| 194 | - | ||
| 195 | - // TODO is_new๏ผๆฐๅๆจ่๏ผ1-ๆฏ๏ผ0-ๅฆ | ||
| 196 | - // TODO is_best๏ผๅฅฝ็ฉไผ้๏ผ1-ๆฏ๏ผ0-ๅฆ | ||
| 197 | - // TODO is_like๏ผ็ไฝ ๅๆฌข๏ผ1-ๆฏ๏ผ0-ๅฆ | ||
| 198 | - | ||
| 199 | - // TODO is_team๏ผๆฏๅฆๅผๅฏๆผๅข[0=ๅฆ๏ผ 1=ๆฏ] | ||
| 200 | - // TODO is_integral๏ผ็งฏๅๆตๆฃ๏ผ1-ๅผๅฏ๏ผ0-ไธๅผๅฏ | ||
| 201 | - // TODO is_member๏ผไผๅไปท๏ผ1-ๅผๅฏ๏ผ0-ไธๅผๅฏ | ||
| 202 | - // TODO give_integral_type๏ผ่ต ้็งฏๅ็ฑปๅ๏ผ0-ไธ่ต ้๏ผ1-่ต ้ๅบๅฎ็งฏๅ๏ผ2-ๆๆฏไพ่ต ้็งฏๅ | ||
| 203 | - // TODO give_integral๏ผ่ต ้็งฏๅ๏ผ | ||
| 204 | - | ||
| 205 | - // TODO poster๏ผๅๅ่ชๅฎไนๆตทๆฅ | ||
| 206 | - | ||
| 207 | - // TODO ========== ๅพ ๅฎๅญๆฎต๏ผlaoji ========= | ||
| 208 | - // TODO productType 1 - ๆฎ้ๅๅ 2 - ้ขๅฎๅๅ๏ผๅฏ่ฝๅ type ๅๅนถไธ้ | ||
| 209 | - // TODO productUnit ๅๅๅไฝ | ||
| 210 | - // TODO extJson ๆฉๅฑไฟกๆฏ๏ผไพๅฆ่ฏด๏ผ้ขๅฎๅๅ็ไฟกๆฏ | ||
| 211 | - | ||
| 212 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/brand/ProductBrandMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.mysql.brand; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandListReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandPageReqVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; | ||
| 9 | -import org.apache.ibatis.annotations.Mapper; | ||
| 10 | - | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -@Mapper | ||
| 14 | -public interface ProductBrandMapper extends BaseMapperX<ProductBrandDO> { | ||
| 15 | - | ||
| 16 | - default PageResult<ProductBrandDO> selectPage(ProductBrandPageReqVO reqVO) { | ||
| 17 | - return selectPage(reqVO, new LambdaQueryWrapperX<ProductBrandDO>() | ||
| 18 | - .likeIfPresent(ProductBrandDO::getName, reqVO.getName()) | ||
| 19 | - .eqIfPresent(ProductBrandDO::getStatus, reqVO.getStatus()) | ||
| 20 | - .betweenIfPresent(ProductBrandDO::getCreateTime, reqVO.getCreateTime()) | ||
| 21 | - .orderByDesc(ProductBrandDO::getId)); | ||
| 22 | - } | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - default List<ProductBrandDO> selectList(ProductBrandListReqVO reqVO) { | ||
| 26 | - return selectList(new LambdaQueryWrapperX<ProductBrandDO>() | ||
| 27 | - .likeIfPresent(ProductBrandDO::getName, reqVO.getName())); | ||
| 28 | - } | ||
| 29 | - | ||
| 30 | - default ProductBrandDO selectByName(String name) { | ||
| 31 | - return selectOne(ProductBrandDO::getName, name); | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/category/ProductCategoryMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.mysql.category; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCategoryListReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; | ||
| 7 | -import org.apache.ibatis.annotations.Mapper; | ||
| 8 | - | ||
| 9 | -import java.util.List; | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * ๅๅๅ็ฑป Mapper | ||
| 13 | - * | ||
| 14 | - * @author ่้ๆบ็ | ||
| 15 | - */ | ||
| 16 | -@Mapper | ||
| 17 | -public interface ProductCategoryMapper extends BaseMapperX<ProductCategoryDO> { | ||
| 18 | - | ||
| 19 | - default List<ProductCategoryDO> selectList(ProductCategoryListReqVO listReqVO) { | ||
| 20 | - return selectList(new LambdaQueryWrapperX<ProductCategoryDO>() | ||
| 21 | - .likeIfPresent(ProductCategoryDO::getName, listReqVO.getName()) | ||
| 22 | - .orderByDesc(ProductCategoryDO::getId)); | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - default Long selectCountByParentId(Long parentId) { | ||
| 26 | - return selectCount(ProductCategoryDO::getParentId, parentId); | ||
| 27 | - } | ||
| 28 | - | ||
| 29 | - default List<ProductCategoryDO> selectListByStatus(Integer status) { | ||
| 30 | - return selectList(ProductCategoryDO::getStatus, status); | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/property/ProductPropertyMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.mysql.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyListReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyPageReqVO; | ||
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; | ||
| 9 | -import org.apache.ibatis.annotations.Mapper; | ||
| 10 | - | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -@Mapper | ||
| 14 | -public interface ProductPropertyMapper extends BaseMapperX<ProductPropertyDO> { | ||
| 15 | - | ||
| 16 | - default PageResult<ProductPropertyDO> selectPage(ProductPropertyPageReqVO reqVO) { | ||
| 17 | - return selectPage(reqVO, new LambdaQueryWrapperX<ProductPropertyDO>() | ||
| 18 | - .likeIfPresent(ProductPropertyDO::getName, reqVO.getName()) | ||
| 19 | - .betweenIfPresent(ProductPropertyDO::getCreateTime, reqVO.getCreateTime()) | ||
| 20 | - .orderByDesc(ProductPropertyDO::getId)); | ||
| 21 | - } | ||
| 22 | - | ||
| 23 | - default ProductPropertyDO selectByName(String name) { | ||
| 24 | - return selectOne(ProductPropertyDO::getName, name); | ||
| 25 | - } | ||
| 26 | - | ||
| 27 | - default List<ProductPropertyDO> selectList(ProductPropertyListReqVO listReqVO) { | ||
| 28 | - return selectList(new LambdaQueryWrapperX<ProductPropertyDO>() | ||
| 29 | - .eqIfPresent(ProductPropertyDO::getName, listReqVO.getName())); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/property/ProductPropertyValueMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.product.dal.mysql.property; | ||
| 2 | - | ||
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | ||
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValuePageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; | ||
| 8 | -import org.apache.ibatis.annotations.Mapper; | ||
| 9 | - | ||
| 10 | -import java.util.Collection; | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -@Mapper | ||
| 14 | -public interface ProductPropertyValueMapper extends BaseMapperX<ProductPropertyValueDO> { | ||
| 15 | - | ||
| 16 | - default List<ProductPropertyValueDO> selectListByPropertyId(Collection<Long> propertyIds) { | ||
| 17 | - return selectList(new LambdaQueryWrapperX<ProductPropertyValueDO>() | ||
| 18 | - .inIfPresent(ProductPropertyValueDO::getPropertyId, propertyIds)); | ||
| 19 | - } | ||
| 20 | - | ||
| 21 | - default ProductPropertyValueDO selectByName(Long propertyId, String name) { | ||
| 22 | - return selectOne(new LambdaQueryWrapperX<ProductPropertyValueDO>() | ||
| 23 | - .eq(ProductPropertyValueDO::getPropertyId, propertyId) | ||
| 24 | - .eq(ProductPropertyValueDO::getName, name)); | ||
| 25 | - } | ||
| 26 | - | ||
| 27 | - default void deleteByPropertyId(Long propertyId) { | ||
| 28 | - delete(new LambdaQueryWrapperX<ProductPropertyValueDO>() | ||
| 29 | - .eq(ProductPropertyValueDO::getPropertyId, propertyId)); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | - default PageResult<ProductPropertyValueDO> selectPage(ProductPropertyValuePageReqVO reqVO) { | ||
| 33 | - return selectPage(reqVO, new LambdaQueryWrapperX<ProductPropertyValueDO>() | ||
| 34 | - .eqIfPresent(ProductPropertyValueDO::getPropertyId, reqVO.getPropertyId()) | ||
| 35 | - .likeIfPresent(ProductPropertyValueDO::getName, reqVO.getName()) | ||
| 36 | - .orderByDesc(ProductPropertyValueDO::getId)); | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - default Integer selectCountByPropertyId(Long propertyId) { | ||
| 40 | - return selectCount(ProductPropertyValueDO::getPropertyId, propertyId).intValue(); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | -} |