Commit 854ba3315ccfc0080850dcac6e81bee03c3e17fc

Authored by xingyu
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
1 -/**  
2 - * ๅ ไฝ  
3 - */  
4 -package cn.iocoder.yudao.module.product.api;  
5 \ No newline at end of file 0 \ No newline at end of file
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
1 -### ่Žทๅพ—ๅ•†ๅ“ SPU ๆ˜Ž็ป†  
2 -GET {{baseUrl}}/product/spu/get-detail?id=4  
3 -Authorization: Bearer {{token}}  
4 -tenant-id: {{adminTenentId}}  
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
1 -/**  
2 - * ๅ ไฝ็ฌฆ๏ผŒๆ— ๆ—ถ้—ดไฝœ็”จ๏ผŒ้ฟๅ… package ็ผฉ่ฟ›  
3 - */  
4 -package cn.iocoder.yudao.module.product.controller.app.property;  
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/property/vo/property/package-info.java deleted
1 -/**  
2 - * ๅ ไฝ็ฌฆ๏ผŒๆ— ๆ—ถ้—ดไฝœ็”จ๏ผŒ้ฟๅ… package ็ผฉ่ฟ›  
3 - */  
4 -package cn.iocoder.yudao.module.product.controller.app.property.vo.property;  
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
1 -### ่Žทๅพ—่ฎขๅ•ไบคๆ˜“็š„ๅˆ†้กต TODO  
2 -GET {{appApi}}/product/spu/page?pageNo=1&pageSize=10  
3 -Authorization: Bearer {{appToken}}  
4 -tenant-id: {{appTenentId}}  
5 -  
6 -### ่Žทๅพ—ๅ•†ๅ“ SPU ๆ˜Ž็ป†  
7 -GET {{appApi}}/product/spu/get-detail?id=4  
8 -tenant-id: {{appTenentId}}  
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 -}