Commit 2cc60deb973a38acd0148e341f832a6821a0cdec
1 parent
9632c33d
mall:code review 商品规格、规格值的代码
Showing
20 changed files
with
84 additions
and
154 deletions
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyController.java
| 1 | 1 | package cn.iocoder.yudao.module.product.controller.admin.property; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; | |
| 4 | -import org.springframework.web.bind.annotation.*; | |
| 5 | -import javax.annotation.Resource; | |
| 6 | -import org.springframework.validation.annotation.Validated; | |
| 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.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.ProductPropertyPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyUpdateReqVO; | |
| 9 | +import cn.iocoder.yudao.module.product.service.property.ProductPropertyService; | |
| 10 | +import io.swagger.annotations.Api; | |
| 11 | +import io.swagger.annotations.ApiImplicitParam; | |
| 12 | +import io.swagger.annotations.ApiOperation; | |
| 7 | 13 | import org.springframework.security.access.prepost.PreAuthorize; |
| 8 | -import io.swagger.annotations.*; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | +import org.springframework.web.bind.annotation.*; | |
| 9 | 16 | |
| 10 | -import javax.validation.*; | |
| 11 | -import javax.servlet.http.*; | |
| 12 | -import java.util.*; | |
| 13 | -import java.io.IOException; | |
| 17 | +import javax.annotation.Resource; | |
| 18 | +import javax.validation.Valid; | |
| 14 | 19 | |
| 15 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 16 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 17 | 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 18 | 21 | |
| 19 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 20 | - | |
| 21 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 22 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; | |
| 23 | - | |
| 24 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.*; | |
| 25 | -import cn.iocoder.yudao.module.product.convert.property.ProductPropertyConvert; | |
| 26 | -import cn.iocoder.yudao.module.product.service.property.ProductPropertyService; | |
| 27 | - | |
| 28 | 22 | @Api(tags = "管理后台 - 规格名称") |
| 29 | 23 | @RestController |
| 30 | 24 | @RequestMapping("/product/property") |
| ... | ... | @@ -66,15 +60,6 @@ public class ProductPropertyController { |
| 66 | 60 | return success(productPropertyService.getPropertyResp(id)); |
| 67 | 61 | } |
| 68 | 62 | |
| 69 | - @GetMapping("/list") | |
| 70 | - @ApiOperation("获得规格名称列表") | |
| 71 | - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) | |
| 72 | - @PreAuthorize("@ss.hasPermission('product:property:query')") | |
| 73 | - public CommonResult<List<ProductPropertyAndValueRespVO>> getPropertyList(@RequestParam("ids") Collection<Long> ids) { | |
| 74 | - List<ProductPropertyDO> list = productPropertyService.getPropertyList(ids); | |
| 75 | - return success(ProductPropertyConvert.INSTANCE.convertList(list)); | |
| 76 | - } | |
| 77 | - | |
| 78 | 63 | @GetMapping("/page") |
| 79 | 64 | @ApiOperation("获得规格名称分页") |
| 80 | 65 | @PreAuthorize("@ss.hasPermission('product:property:query')") |
| ... | ... | @@ -82,16 +67,4 @@ public class ProductPropertyController { |
| 82 | 67 | return success(productPropertyService.getPropertyListPage(pageVO)); |
| 83 | 68 | } |
| 84 | 69 | |
| 85 | - @GetMapping("/export-excel") | |
| 86 | - @ApiOperation("导出规格名称 Excel") | |
| 87 | - @PreAuthorize("@ss.hasPermission('product:property:export')") | |
| 88 | - @OperateLog(type = EXPORT) | |
| 89 | - public void exportPropertyExcel(@Valid ProductPropertyExportReqVO exportReqVO, | |
| 90 | - HttpServletResponse response) throws IOException { | |
| 91 | - List<ProductPropertyDO> list = productPropertyService.getPropertyList(exportReqVO); | |
| 92 | - // 导出 Excel | |
| 93 | - List<ProductPropertyExcelVO> datas = ProductPropertyConvert.INSTANCE.convertList02(list); | |
| 94 | - ExcelUtils.write(response, "规格名称.xls", "数据", ProductPropertyExcelVO.class, datas); | |
| 95 | - } | |
| 96 | - | |
| 97 | 70 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyExcelVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 2 | - | |
| 3 | -import lombok.*; | |
| 4 | -import java.util.*; | |
| 5 | -import io.swagger.annotations.*; | |
| 6 | - | |
| 7 | -import com.alibaba.excel.annotation.ExcelProperty; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * 规格名称 Excel VO | |
| 11 | - * | |
| 12 | - * @author 芋道源码 | |
| 13 | - */ | |
| 14 | -@Data | |
| 15 | -public class ProductPropertyExcelVO { | |
| 16 | - | |
| 17 | - @ExcelProperty("主键") | |
| 18 | - private Long id; | |
| 19 | - | |
| 20 | - @ExcelProperty("规格名称") | |
| 21 | - private String name; | |
| 22 | - | |
| 23 | - @ExcelProperty("状态: 0 开启 ,1 禁用") | |
| 24 | - private Integer status; | |
| 25 | - | |
| 26 | - @ExcelProperty("创建时间") | |
| 27 | - private Date createTime; | |
| 28 | - | |
| 29 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyExportReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 2 | - | |
| 3 | -import lombok.*; | |
| 4 | -import java.util.*; | |
| 5 | -import io.swagger.annotations.*; | |
| 6 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 7 | -import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | - | |
| 9 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 10 | - | |
| 11 | -@ApiModel(value = "管理后台 - 规格名称 Excel 导出 Request VO", description = "参数和 PropertyPageReqVO 是一致的") | |
| 12 | -@Data | |
| 13 | -public class ProductPropertyExportReqVO { | |
| 14 | - | |
| 15 | - @ApiModelProperty(value = "规格名称") | |
| 16 | - private String name; | |
| 17 | - | |
| 18 | - @ApiModelProperty(value = "状态: 0 开启 ,1 禁用") | |
| 19 | - private Integer status; | |
| 20 | - | |
| 21 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 22 | - @ApiModelProperty(value = "创建时间") | |
| 23 | - private Date[] createTime; | |
| 24 | - | |
| 25 | -} |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyAndValueRespVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyAndValueRespVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueRespVO; | |
| 3 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; | |
| 4 | 4 | import io.swagger.annotations.ApiModel; |
| 5 | 5 | import io.swagger.annotations.ApiModelProperty; |
| 6 | 6 | import lombok.Data; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyBaseVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyBaseVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | |
| 2 | 2 | |
| 3 | 3 | import io.swagger.annotations.ApiModelProperty; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | |
| 6 | -// TODO @芋艿:完整的 review 下规格 | |
| 6 | +import javax.validation.constraints.NotEmpty; | |
| 7 | + | |
| 7 | 8 | /** |
| 8 | 9 | * 规格名称 Base VO,提供给添加、修改、详细的子 VO 使用 |
| 9 | 10 | * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
| ... | ... | @@ -11,10 +12,12 @@ import lombok.Data; |
| 11 | 12 | @Data |
| 12 | 13 | public class ProductPropertyBaseVO { |
| 13 | 14 | |
| 14 | - @ApiModelProperty(value = "规格名称") | |
| 15 | + @ApiModelProperty(value = "规格名称", required = true, example = "颜色") | |
| 16 | + @NotEmpty(message = "规格名称不能为空") | |
| 15 | 17 | private String name; |
| 16 | 18 | |
| 17 | - @ApiModelProperty(value = "状态: 0 开启 ,1 禁用") | |
| 19 | + @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") | |
| 20 | + @NotEmpty(message = "状态不能为空") | |
| 18 | 21 | private Integer status; |
| 19 | 22 | |
| 20 | 23 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyCreateReqVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyCreateReqVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueCreateReqVO; | |
| 3 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO; | |
| 4 | 4 | import lombok.*; |
| 5 | 5 | import io.swagger.annotations.*; |
| 6 | 6 | |
| ... | ... | @@ -13,6 +13,7 @@ import java.util.List; |
| 13 | 13 | @ToString(callSuper = true) |
| 14 | 14 | public class ProductPropertyCreateReqVO extends ProductPropertyBaseVO { |
| 15 | 15 | |
| 16 | + // TODO @Luowenfeng:规格值的 CRUD 可以单独;前端 + 后端,改成类似字典类型、字典数据的这种交互;在加一个 ProductPropertyValueController | |
| 16 | 17 | @ApiModelProperty(value = "属性值") |
| 17 | 18 | @NotNull(message = "属性值不能为空") |
| 18 | 19 | List<ProductPropertyValueCreateReqVO> propertyValueList; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyPageReqVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyPageReqVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | |
| 2 | 2 | |
| 3 | -import lombok.*; | |
| 4 | -import java.util.*; | |
| 5 | -import io.swagger.annotations.*; | |
| 6 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | +import io.swagger.annotations.ApiModel; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | +import lombok.EqualsAndHashCode; | |
| 8 | +import lombok.ToString; | |
| 7 | 9 | import org.springframework.format.annotation.DateTimeFormat; |
| 8 | 10 | |
| 11 | +import java.util.Date; | |
| 12 | + | |
| 9 | 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 10 | 14 | |
| 11 | 15 | @ApiModel("管理后台 - 规格名称分页 Request VO") |
| ... | ... | @@ -14,10 +18,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 14 | 18 | @ToString(callSuper = true) |
| 15 | 19 | public class ProductPropertyPageReqVO extends PageParam { |
| 16 | 20 | |
| 17 | - @ApiModelProperty(value = "规格名称") | |
| 21 | + @ApiModelProperty(value = "规格名称", example = "颜色") | |
| 18 | 22 | private String name; |
| 19 | 23 | |
| 20 | - @ApiModelProperty(value = "状态: 0 开启 ,1 禁用") | |
| 24 | + @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") | |
| 21 | 25 | private Integer status; |
| 22 | 26 | |
| 23 | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyUpdateReqVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyUpdateReqVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.property.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; | |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueCreateReqVO; | |
| 3 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO; | |
| 4 | 4 | import lombok.*; |
| 5 | 5 | import io.swagger.annotations.*; |
| 6 | 6 | import javax.validation.constraints.*; |
| ... | ... | @@ -12,7 +12,7 @@ import java.util.List; |
| 12 | 12 | @ToString(callSuper = true) |
| 13 | 13 | public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO { |
| 14 | 14 | |
| 15 | - @ApiModelProperty(value = "主键", required = true) | |
| 15 | + @ApiModelProperty(value = "主键", required = true, example = "1") | |
| 16 | 16 | @NotNull(message = "主键不能为空") |
| 17 | 17 | private Long id; |
| 18 | 18 | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/propertyvalue/vo/ProductPropertyValueBaseVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueBaseVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | |
| 2 | 2 | |
| 3 | -import lombok.*; | |
| 4 | -import java.util.*; | |
| 5 | -import io.swagger.annotations.*; | |
| 6 | -import javax.validation.constraints.*; | |
| 3 | +import io.swagger.annotations.ApiModelProperty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import javax.validation.constraints.NotEmpty; | |
| 7 | +import javax.validation.constraints.NotNull; | |
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * 规格值 Base VO,提供给添加、修改、详细的子 VO 使用 |
| ... | ... | @@ -12,13 +13,16 @@ import javax.validation.constraints.*; |
| 12 | 13 | @Data |
| 13 | 14 | public class ProductPropertyValueBaseVO { |
| 14 | 15 | |
| 15 | - @ApiModelProperty(value = "规格键id") | |
| 16 | + @ApiModelProperty(value = "规格编号", required = true, example = "1024") | |
| 17 | + @NotNull(message = "规格编号不能为空") | |
| 16 | 18 | private Long propertyId; |
| 17 | 19 | |
| 18 | - @ApiModelProperty(value = "规格值名字") | |
| 20 | + @ApiModelProperty(value = "规格值名字", required = true, example = "红色") | |
| 21 | + @NotEmpty(message = "规格值名字不能为空") | |
| 19 | 22 | private String name; |
| 20 | 23 | |
| 21 | - @ApiModelProperty(value = "状态: 1 开启 ,2 禁用") | |
| 24 | + @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") | |
| 25 | + @NotEmpty(message = "状态不能为空") | |
| 22 | 26 | private Integer status; |
| 23 | 27 | |
| 24 | 28 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/propertyvalue/vo/ProductPropertyValueCreateReqVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueCreateReqVO.java
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/propertyvalue/vo/ProductPropertyValueRespVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueRespVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | |
| 2 | 2 | |
| 3 | -import lombok.*; | |
| 4 | -import java.util.*; | |
| 5 | -import io.swagger.annotations.*; | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import java.util.Date; | |
| 6 | 10 | |
| 7 | 11 | @ApiModel("管理后台 - 规格值 Response VO") |
| 8 | 12 | @Data |
| ... | ... | @@ -10,7 +14,7 @@ import io.swagger.annotations.*; |
| 10 | 14 | @ToString(callSuper = true) |
| 11 | 15 | public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO { |
| 12 | 16 | |
| 13 | - @ApiModelProperty(value = "主键", required = true) | |
| 17 | + @ApiModelProperty(value = "主键", required = true, example = "10") | |
| 14 | 18 | private Long id; |
| 15 | 19 | |
| 16 | 20 | @ApiModelProperty(value = "创建时间") | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/propertyvalue/vo/ProductPropertyValueUpdateReqVO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueUpdateReqVO.java
| 1 | -package cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo; | |
| 1 | +package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; | |
| 2 | 2 | |
| 3 | 3 | import lombok.*; |
| 4 | 4 | import io.swagger.annotations.*; |
| ... | ... | @@ -10,7 +10,7 @@ import javax.validation.constraints.*; |
| 10 | 10 | @ToString(callSuper = true) |
| 11 | 11 | public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO { |
| 12 | 12 | |
| 13 | - @ApiModelProperty(value = "主键", required = true) | |
| 13 | + @ApiModelProperty(value = "主键", required = true, example = "1024") | |
| 14 | 14 | @NotNull(message = "主键不能为空") |
| 15 | 15 | private Integer id; |
| 16 | 16 | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/property/ProductPropertyConvert.java
| ... | ... | @@ -4,10 +4,13 @@ import java.util.*; |
| 4 | 4 | |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | |
| 7 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyAndValueRespVO; | |
| 8 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyCreateReqVO; | |
| 9 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyExcelVO; | |
| 10 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyUpdateReqVO; | |
| 7 | 11 | import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; |
| 8 | 12 | import org.mapstruct.Mapper; |
| 9 | 13 | import org.mapstruct.factory.Mappers; |
| 10 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.*; | |
| 11 | 14 | |
| 12 | 15 | /** |
| 13 | 16 | * 规格名称 Convert | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/propertyvalue/ProductPropertyValueConvert.java
| ... | ... | @@ -4,10 +4,12 @@ import java.util.*; |
| 4 | 4 | |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | |
| 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; | |
| 7 | 10 | import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; |
| 8 | 11 | import org.mapstruct.Mapper; |
| 9 | 12 | import org.mapstruct.factory.Mappers; |
| 10 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.*; | |
| 11 | 13 | |
| 12 | 14 | /** |
| 13 | 15 | * 规格值 Convert | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/property/ProductPropertyMapper.java
| ... | ... | @@ -5,9 +5,10 @@ import java.util.*; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 7 | 7 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 8 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyExportReqVO; | |
| 9 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyPageReqVO; | |
| 8 | 10 | import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; |
| 9 | 11 | import org.apache.ibatis.annotations.Mapper; |
| 10 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.*; | |
| 11 | 12 | |
| 12 | 13 | /** |
| 13 | 14 | * 规格名称 Mapper | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/propertyvalue/ProductPropertyValueMapper.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/property/ProductPropertyValueMapper.java
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/property/ProductPropertyService.java
| 1 | 1 | package cn.iocoder.yudao.module.product.service.property; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.*; | |
| 4 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyAndValueRespVO; | |
| 5 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.*; | |
| 5 | 6 | import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; |
| 6 | 7 | |
| 7 | 8 | import javax.validation.Valid; |
| ... | ... | @@ -62,14 +63,6 @@ public interface ProductPropertyService { |
| 62 | 63 | PageResult<ProductPropertyDO> getPropertyPage(ProductPropertyPageReqVO pageReqVO); |
| 63 | 64 | |
| 64 | 65 | /** |
| 65 | - * 获得规格名称列表, 用于 Excel 导出 | |
| 66 | - * | |
| 67 | - * @param exportReqVO 查询条件 | |
| 68 | - * @return 规格名称列表 | |
| 69 | - */ | |
| 70 | - List<ProductPropertyDO> getPropertyList(ProductPropertyExportReqVO exportReqVO); | |
| 71 | - | |
| 72 | - /** | |
| 73 | 66 | * 获取属性及属性值列表 分页 |
| 74 | 67 | * @param pageReqVO |
| 75 | 68 | * @return | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/property/ProductPropertyServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.product.service.property; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.*; | |
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueCreateReqVO; | |
| 6 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueRespVO; | |
| 4 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyAndValueRespVO; | |
| 5 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.*; | |
| 6 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; | |
| 7 | 8 | import cn.iocoder.yudao.module.product.convert.property.ProductPropertyConvert; |
| 8 | 9 | import cn.iocoder.yudao.module.product.convert.propertyvalue.ProductPropertyValueConvert; |
| 9 | 10 | import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyDO; |
| 10 | 11 | import cn.iocoder.yudao.module.product.dal.dataobject.property.ProductPropertyValueDO; |
| 11 | 12 | import cn.iocoder.yudao.module.product.dal.mysql.property.ProductPropertyMapper; |
| 12 | -import cn.iocoder.yudao.module.product.dal.mysql.propertyvalue.ProductPropertyValueMapper; | |
| 13 | +import cn.iocoder.yudao.module.product.dal.mysql.property.ProductPropertyValueMapper; | |
| 13 | 14 | import org.springframework.stereotype.Service; |
| 14 | 15 | import org.springframework.transaction.annotation.Transactional; |
| 15 | 16 | import org.springframework.validation.annotation.Validated; |
| ... | ... | @@ -103,11 +104,6 @@ public class ProductPropertyServiceImpl implements ProductPropertyService { |
| 103 | 104 | } |
| 104 | 105 | |
| 105 | 106 | @Override |
| 106 | - public List<ProductPropertyDO> getPropertyList(ProductPropertyExportReqVO exportReqVO) { | |
| 107 | - return productPropertyMapper.selectList(exportReqVO); | |
| 108 | - } | |
| 109 | - | |
| 110 | - @Override | |
| 111 | 107 | public PageResult<ProductPropertyAndValueRespVO> getPropertyListPage(ProductPropertyPageReqVO pageReqVO) { |
| 112 | 108 | //获取属性列表 |
| 113 | 109 | PageResult<ProductPropertyDO> pageResult = productPropertyMapper.selectPage(pageReqVO); | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuServiceImpl.java
| ... | ... | @@ -4,8 +4,8 @@ import cn.hutool.core.collection.CollectionUtil; |
| 4 | 4 | import cn.hutool.core.util.ObjectUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.ProductPropertyAndValueRespVO; | |
| 8 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueRespVO; | |
| 7 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyAndValueRespVO; | |
| 8 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; | |
| 9 | 9 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuBaseVO; |
| 10 | 10 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuPageReqVO; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java
| ... | ... | @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.product.service.spu; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 5 | -import cn.iocoder.yudao.module.product.controller.admin.property.vo.ProductPropertyAndValueRespVO; | |
| 5 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.ProductPropertyAndValueRespVO; | |
| 6 | 6 | import cn.iocoder.yudao.module.product.controller.admin.property.vo.ProductPropertyViewRespVO; |
| 7 | -import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueRespVO; | |
| 7 | +import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; | |
| 8 | 8 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuBaseVO; |
| 9 | 9 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuRespVO; | ... | ... |