refactor: springdoc 替换 springfox

This commit is contained in:
xingyu4j
2022-12-09 13:43:15 +08:00
parent 02174383a7
commit 9fc6e0f00b
469 changed files with 3317 additions and 3721 deletions

View File

@@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.product.controller.admin.brand.vo.*;
import cn.iocoder.yudao.module.product.convert.brand.ProductBrandConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO;
import cn.iocoder.yudao.module.product.service.brand.ProductBrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -20,7 +20,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 商品品牌")
@Tag(name = "管理后台 - 商品品牌")
@RestController
@RequestMapping("/product/brand")
@Validated
@@ -30,14 +30,14 @@ public class ProductBrandController {
private ProductBrandService brandService;
@PostMapping("/create")
@ApiOperation("创建品牌")
@Operation(summary = "创建品牌")
@PreAuthorize("@ss.hasPermission('product:brand:create')")
public CommonResult<Long> createBrand(@Valid @RequestBody ProductBrandCreateReqVO createReqVO) {
return success(brandService.createBrand(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新品牌")
@Operation(summary = "更新品牌")
@PreAuthorize("@ss.hasPermission('product:brand:update')")
public CommonResult<Boolean> updateBrand(@Valid @RequestBody ProductBrandUpdateReqVO updateReqVO) {
brandService.updateBrand(updateReqVO);
@@ -45,8 +45,8 @@ public class ProductBrandController {
}
@DeleteMapping("/delete")
@ApiOperation("删除品牌")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除品牌")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('product:brand:delete')")
public CommonResult<Boolean> deleteBrand(@RequestParam("id") Long id) {
brandService.deleteBrand(id);
@@ -54,8 +54,8 @@ public class ProductBrandController {
}
@GetMapping("/get")
@ApiOperation("获得品牌")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得品牌")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('product:brand:query')")
public CommonResult<ProductBrandRespVO> getBrand(@RequestParam("id") Long id) {
ProductBrandDO brand = brandService.getBrand(id);
@@ -63,7 +63,7 @@ public class ProductBrandController {
}
@GetMapping("/page")
@ApiOperation("获得品牌分页")
@Operation(summary = "获得品牌分页")
@PreAuthorize("@ss.hasPermission('product:brand:query')")
public CommonResult<PageResult<ProductBrandRespVO>> getBrandPage(@Valid ProductBrandPageReqVO pageVO) {
PageResult<ProductBrandDO> pageResult = brandService.getBrandPage(pageVO);
@@ -71,7 +71,7 @@ public class ProductBrandController {
}
@GetMapping("/list")
@ApiOperation("获得品牌列表")
@Operation(summary = "获得品牌列表")
@PreAuthorize("@ss.hasPermission('product:brand:query')")
public CommonResult<List<ProductBrandRespVO>> getBrandList(@Valid ProductBrandListReqVO listVO) {
List<ProductBrandDO> list = brandService.getBrandList(listVO);

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@@ -12,22 +11,22 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductBrandBaseVO {
@ApiModelProperty(value = "品牌名称", required = true, example = "芋道")
@Schema(title = "品牌名称", required = true, example = "芋道")
@NotNull(message = "品牌名称不能为空")
private String name;
@ApiModelProperty(value = "品牌图片", required = true)
@Schema(title = "品牌图片", required = true)
@NotNull(message = "品牌图片不能为空")
private String picUrl;
@ApiModelProperty(value = "品牌排序", required = true, example = "1")
@Schema(title = "品牌排序", required = true, example = "1")
@NotNull(message = "品牌排序不能为空")
private Integer sort;
@ApiModelProperty(value = "品牌描述", example = "描述")
@Schema(title = "品牌描述", example = "描述")
private String description;
@ApiModelProperty(value = "状态", required = true, example = "0")
@Schema(title = "状态", required = true, example = "0")
@NotNull(message = "状态不能为空")
private Integer status;

View File

@@ -1,9 +1,8 @@
package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 商品品牌创建 Request VO")
@Schema(title = "管理后台 - 商品品牌创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -1,14 +1,13 @@
package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ApiModel(value = "管理后台 - 商品品牌分页 Request VO")
@Schema(title = "管理后台 - 商品品牌分页 Request VO")
@Data
public class ProductBrandListReqVO {
@ApiModelProperty(value = "品牌名称", example = "芋道")
@Schema(title = "品牌名称", example = "芋道")
private String name;
}

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,20 +11,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 商品品牌分页 Request VO")
@Schema(title = "管理后台 - 商品品牌分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductBrandPageReqVO extends PageParam {
@ApiModelProperty(value = "品牌名称", example = "芋道")
@Schema(title = "品牌名称", example = "芋道")
private String name;
@ApiModelProperty(value = "状态", example = "0", notes = "参考 CommonStatusEnum 枚举")
@Schema(title = "状态", example = "0", description = "参考 CommonStatusEnum 枚举")
private Integer status;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间")
@Schema(title = "创建时间")
private LocalDateTime[] createTime;
}

View File

@@ -1,23 +1,22 @@
package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 品牌 Response VO")
@Schema(title = "管理后台 - 品牌 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductBrandRespVO extends ProductBrandBaseVO {
@ApiModelProperty(value = "品牌编号", required = true, example = "1")
@Schema(title = "品牌编号", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(title = "创建时间", required = true)
private LocalDateTime createTime;
}

View File

@@ -1,16 +1,15 @@
package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 商品品牌更新 Request VO")
@Schema(title = "管理后台 - 商品品牌更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductBrandUpdateReqVO extends ProductBrandBaseVO {
@ApiModelProperty(value = "品牌编号", required = true, example = "1")
@Schema(title = "品牌编号", required = true, example = "1")
@NotNull(message = "品牌编号不能为空")
private Long id;

View File

@@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCateg
import cn.iocoder.yudao.module.product.convert.category.ProductCategoryConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO;
import cn.iocoder.yudao.module.product.service.category.ProductCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -22,7 +22,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 商品分类")
@Tag(name = "管理后台 - 商品分类")
@RestController
@RequestMapping("/product/category")
@Validated
@@ -32,14 +32,14 @@ public class ProductCategoryController {
private ProductCategoryService categoryService;
@PostMapping("/create")
@ApiOperation("创建商品分类")
@Operation(summary = "创建商品分类")
@PreAuthorize("@ss.hasPermission('product:category:create')")
public CommonResult<Long> createCategory(@Valid @RequestBody ProductCategoryCreateReqVO createReqVO) {
return success(categoryService.createCategory(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新商品分类")
@Operation(summary = "更新商品分类")
@PreAuthorize("@ss.hasPermission('product:category:update')")
public CommonResult<Boolean> updateCategory(@Valid @RequestBody ProductCategoryUpdateReqVO updateReqVO) {
categoryService.updateCategory(updateReqVO);
@@ -47,8 +47,8 @@ public class ProductCategoryController {
}
@DeleteMapping("/delete")
@ApiOperation("删除商品分类")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除商品分类")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('product:category:delete')")
public CommonResult<Boolean> deleteCategory(@RequestParam("id") Long id) {
categoryService.deleteCategory(id);
@@ -56,8 +56,8 @@ public class ProductCategoryController {
}
@GetMapping("/get")
@ApiOperation("获得商品分类")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得商品分类")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('product:category:query')")
public CommonResult<ProductCategoryRespVO> getCategory(@RequestParam("id") Long id) {
ProductCategoryDO category = categoryService.getCategory(id);
@@ -65,7 +65,7 @@ public class ProductCategoryController {
}
@GetMapping("/list")
@ApiOperation("获得商品分类列表")
@Operation(summary = "获得商品分类列表")
@PreAuthorize("@ss.hasPermission('product:category:query')")
public CommonResult<List<ProductCategoryRespVO>> getCategoryList(@Valid ProductCategoryListReqVO treeListReqVO) {
List<ProductCategoryDO> list = categoryService.getEnableCategoryList(treeListReqVO);

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -13,25 +12,25 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductCategoryBaseVO {
@ApiModelProperty(value = "父分类编号", required = true, example = "1")
@Schema(title = "父分类编号", required = true, example = "1")
@NotNull(message = "父分类编号不能为空")
private Long parentId;
@ApiModelProperty(value = "分类名称", required = true, example = "办公文具")
@Schema(title = "分类名称", required = true, example = "办公文具")
@NotBlank(message = "分类名称不能为空")
private String name;
@ApiModelProperty(value = "分类图片", required = true)
@Schema(title = "分类图片", required = true)
@NotBlank(message = "分类图片不能为空")
private String picUrl;
@ApiModelProperty(value = "分类排序", required = true, example = "1")
@Schema(title = "分类排序", required = true, example = "1")
private Integer sort;
@ApiModelProperty(value = "分类描述", required = true, example = "描述")
@Schema(title = "分类描述", required = true, example = "描述")
private String description;
@ApiModelProperty(value = "开启状态", required = true, example = "0")
@Schema(title = "开启状态", required = true, example = "0")
@NotNull(message = "开启状态不能为空")
private Integer status;

View File

@@ -1,9 +1,8 @@
package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 商品分类创建 Request VO")
@Schema(title = "管理后台 - 商品分类创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -1,14 +1,13 @@
package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ApiModel(value = "管理后台 - 商品分类列表查询 Request VO")
@Schema(title = "管理后台 - 商品分类列表查询 Request VO")
@Data
public class ProductCategoryListReqVO {
@ApiModelProperty(value = "分类名称", example = "办公文具")
@Schema(title = "分类名称", example = "办公文具")
private String name;
}

View File

@@ -1,20 +1,19 @@
package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 商品分类 Response VO")
@Schema(title = "管理后台 - 商品分类 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductCategoryRespVO extends ProductCategoryBaseVO {
@ApiModelProperty(value = "分类编号", required = true, example = "2")
@Schema(title = "分类编号", required = true, example = "2")
private Long id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(title = "创建时间", required = true)
private LocalDateTime createTime;
}

View File

@@ -1,16 +1,15 @@
package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 商品分类更新 Request VO")
@Schema(title = "管理后台 - 商品分类更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO {
@ApiModelProperty(value = "分类编号", required = true, example = "2")
@Schema(title = "分类编号", required = true, example = "2")
@NotNull(message = "分类编号不能为空")
private Long id;

View File

@@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.product.controller.admin.property.vo.property.*;
import cn.iocoder.yudao.module.product.service.property.ProductPropertyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -18,7 +18,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 规格名称")
@Tag(name = "管理后台 - 规格名称")
@RestController
@RequestMapping("/product/property")
@Validated
@@ -28,14 +28,14 @@ public class ProductPropertyController {
private ProductPropertyService productPropertyService;
@PostMapping("/create")
@ApiOperation("创建规格名称")
@Operation(summary = "创建规格名称")
@PreAuthorize("@ss.hasPermission('product:property:create')")
public CommonResult<Long> createProperty(@Valid @RequestBody ProductPropertyCreateReqVO createReqVO) {
return success(productPropertyService.createProperty(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新规格名称")
@Operation(summary = "更新规格名称")
@PreAuthorize("@ss.hasPermission('product:property:update')")
public CommonResult<Boolean> updateProperty(@Valid @RequestBody ProductPropertyUpdateReqVO updateReqVO) {
productPropertyService.updateProperty(updateReqVO);
@@ -43,8 +43,8 @@ public class ProductPropertyController {
}
@DeleteMapping("/delete")
@ApiOperation("删除规格名称")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除规格名称")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('product:property:delete')")
public CommonResult<Boolean> deleteProperty(@RequestParam("id") Long id) {
productPropertyService.deleteProperty(id);
@@ -52,29 +52,29 @@ public class ProductPropertyController {
}
@GetMapping("/get")
@ApiOperation("获得规格名称")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得规格名称")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('product:property:query')")
public CommonResult<ProductPropertyRespVO> getProperty(@RequestParam("id") Long id) {
return success(productPropertyService.getProperty(id));
}
@GetMapping("/list")
@ApiOperation("获得规格名称列表")
@Operation(summary = "获得规格名称列表")
@PreAuthorize("@ss.hasPermission('product:property:query')")
public CommonResult<List<ProductPropertyRespVO>> getPropertyList(@Valid ProductPropertyListReqVO listReqVO) {
return success(productPropertyService.getPropertyList(listReqVO));
}
@GetMapping("/page")
@ApiOperation("获得规格名称分页")
@Operation(summary = "获得规格名称分页")
@PreAuthorize("@ss.hasPermission('product:property:query')")
public CommonResult<PageResult<ProductPropertyRespVO>> getPropertyPage(@Valid ProductPropertyPageReqVO pageVO) {
return success(productPropertyService.getPropertyPage(pageVO));
}
@GetMapping("/listAndValue")
@ApiOperation("获得规格名称列表")
@Operation(summary = "获得规格名称列表")
@PreAuthorize("@ss.hasPermission('product:property:query')")
public CommonResult<List<ProductPropertyAndValueRespVO>> getPropertyAndValueList(@Valid ProductPropertyListReqVO listReqVO) {
return success(productPropertyService.getPropertyAndValueList(listReqVO));

View File

@@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.Produc
import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO;
import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueUpdateReqVO;
import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -20,7 +20,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 规格值名称")
@Tag(name = "管理后台 - 规格值名称")
@RestController
@RequestMapping("/product/property/value")
@Validated
@@ -30,14 +30,14 @@ public class ProductPropertyValueController {
private ProductPropertyValueService productPropertyValueService;
@PostMapping("/create")
@ApiOperation("创建规格名称")
@Operation(summary = "创建规格名称")
@PreAuthorize("@ss.hasPermission('product:property:create')")
public CommonResult<Long> createProperty(@Valid @RequestBody ProductPropertyValueCreateReqVO createReqVO) {
return success(productPropertyValueService.createPropertyValue(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新规格名称")
@Operation(summary = "更新规格名称")
@PreAuthorize("@ss.hasPermission('product:property:update')")
public CommonResult<Boolean> updateProperty(@Valid @RequestBody ProductPropertyValueUpdateReqVO updateReqVO) {
productPropertyValueService.updatePropertyValue(updateReqVO);
@@ -45,8 +45,8 @@ public class ProductPropertyValueController {
}
@DeleteMapping("/delete")
@ApiOperation("删除规格名称")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除规格名称")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('product:property:delete')")
public CommonResult<Boolean> deleteProperty(@RequestParam("id") Long id) {
productPropertyValueService.deletePropertyValue(id);
@@ -54,15 +54,15 @@ public class ProductPropertyValueController {
}
@GetMapping("/get")
@ApiOperation("获得规格名称")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得规格名称")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('product:property:query')")
public CommonResult<ProductPropertyValueRespVO> getProperty(@RequestParam("id") Long id) {
return success(productPropertyValueService.getPropertyValue(id));
}
@GetMapping("/page")
@ApiOperation("获得规格名称分页")
@Operation(summary = "获得规格名称分页")
@PreAuthorize("@ss.hasPermission('product:property:query')")
public CommonResult<PageResult<ProductPropertyValueRespVO>> getPropertyValuePage(@Valid ProductPropertyValuePageReqVO pageVO) {
return success(productPropertyValueService.getPropertyValueListPage(pageVO));

View File

@@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@@ -13,22 +12,22 @@ import java.util.List;
* @CreateDate: 2022/7/5 21:29
* @Version: 1.0.0
*/
@ApiModel("管理后台 - 规格名称详情展示 Request VO")
@Schema(title = "管理后台 - 规格名称详情展示 Request VO")
@Data
@ToString(callSuper = true)
public class ProductPropertyViewRespVO {
@ApiModelProperty(value = "规格名称id", example = "1")
@Schema(title = "规格名称id", example = "1")
public Long propertyId;
@ApiModelProperty(value = "规格名称", example = "内存")
@Schema(title = "规格名称", example = "内存")
public String name;
@ApiModelProperty(value = "规格属性值集合", example = "[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]")
@Schema(title = "规格属性值集合", example = "[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]")
public List<Tuple2> propertyValues;
@Data
@ApiModel(value = "规格属性值元组")
@Schema(title = "规格属性值元组")
public static class Tuple2 {
private final long id;
private final String name;

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -10,16 +9,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel("管理后台 - 规格 + 规格值 Response VO")
@Schema(title = "管理后台 - 规格 + 规格值 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyAndValueRespVO extends ProductPropertyBaseVO {
@ApiModelProperty(value = "规格的编号", required = true, example = "1024")
@Schema(title = "规格的编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(title = "创建时间", required = true)
private LocalDateTime createTime;
/**

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -13,14 +12,14 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductPropertyBaseVO {
@ApiModelProperty(value = "规格名称", required = true, example = "颜色")
@Schema(title = "规格名称", required = true, example = "颜色")
@NotBlank(message = "规格名称不能为空")
private String name;
@ApiModelProperty(value = "备注", example = "颜色")
@Schema(title = "备注", example = "颜色")
private String remark;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@NotNull(message = "状态不能为空")
private Integer status;

View File

@@ -1,11 +1,10 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 规格名称创建 Request VO")
@Schema(title = "管理后台 - 规格名称创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -1,19 +1,18 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@ApiModel("管理后台 - 规格名称 List Request VO")
@Schema(title = "管理后台 - 规格名称 List Request VO")
@Data
@ToString(callSuper = true)
public class ProductPropertyListReqVO {
@ApiModelProperty(value = "规格名称", example = "颜色")
@Schema(title = "规格名称", example = "颜色")
private String name;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
private Integer status;
}

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,20 +11,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 规格名称分页 Request VO")
@Schema(title = "管理后台 - 规格名称分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyPageReqVO extends PageParam {
@ApiModelProperty(value = "规格名称", example = "颜色")
@Schema(title = "规格名称", example = "颜色")
private String name;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
private Integer status;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间")
@Schema(title = "创建时间")
private LocalDateTime[] createTime;
}

View File

@@ -1,23 +1,22 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 规格 + 规格值 Response VO")
@Schema(title = "管理后台 - 规格 + 规格值 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyRespVO extends ProductPropertyBaseVO {
@ApiModelProperty(value = "规格的编号", required = true, example = "1024")
@Schema(title = "规格的编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(title = "创建时间", required = true)
private LocalDateTime createTime;
}

View File

@@ -1,18 +1,15 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.property;
import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
import java.util.List;
@ApiModel("管理后台 - 规格名称更新 Request VO")
@Schema(title = "管理后台 - 规格名称更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "1")
@Schema(title = "主键", required = true, example = "1")
@NotNull(message = "主键不能为空")
private Long id;

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.value;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@@ -13,19 +12,19 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductPropertyValueBaseVO {
@ApiModelProperty(value = "规格编号", required = true, example = "1024")
@Schema(title = "规格编号", required = true, example = "1024")
@NotNull(message = "规格编号不能为空")
private Long propertyId;
@ApiModelProperty(value = "规格值名字", required = true, example = "红色")
@Schema(title = "规格值名字", required = true, example = "红色")
@NotEmpty(message = "规格值名字不能为空")
private String name;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@NotNull(message = "状态不能为空")
private Integer status;
@ApiModelProperty(value = "备注", example = "颜色")
@Schema(title = "备注", example = "颜色")
private String remark;
}

View File

@@ -1,9 +1,8 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.value;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 规格值创建 Request VO")
@Schema(title = "管理后台 - 规格值创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.value;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -13,19 +12,19 @@ import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 规格名称值分页 Request VO")
@Schema(title = "管理后台 - 规格名称值分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyValuePageReqVO extends PageParam {
@ApiModelProperty(value = "规格id", example = "1024")
@Schema(title = "规格id", example = "1024")
private String propertyId;
@ApiModelProperty(value = "规格值", example = "红色")
@Schema(title = "规格值", example = "红色")
private String name;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
private Integer status;
}

View File

@@ -1,23 +1,22 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.value;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 规格值 Response VO")
@Schema(title = "管理后台 - 规格值 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "10")
@Schema(title = "主键", required = true, example = "10")
private Long id;
@ApiModelProperty(value = "创建时间")
@Schema(title = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -1,16 +1,15 @@
package cn.iocoder.yudao.module.product.controller.admin.property.vo.value;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 规格值更新 Request VO")
@Schema(title = "管理后台 - 规格值更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "1024")
@Schema(title = "主键", required = true, example = "1024")
@NotNull(message = "主键不能为空")
private Long id;

View File

@@ -9,8 +9,8 @@ import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO;
import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO;
import cn.iocoder.yudao.module.product.service.sku.ProductSkuService;
import cn.iocoder.yudao.module.product.service.spu.ProductSpuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -24,7 +24,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
@Api(tags = "管理后台 - 商品 sku")
@Tag(name = "管理后台 - 商品 sku")
@RestController
@RequestMapping("/product/sku")
@Validated
@@ -36,7 +36,7 @@ public class ProductSkuController {
private ProductSpuService productSpuService;
@GetMapping("/get-option-list")
@ApiOperation("获得商品 SKU 选项的列表")
@Operation(summary = "获得商品 SKU 选项的列表")
// @PreAuthorize("@ss.hasPermission('product:sku:query')")
public CommonResult<List<ProductSkuOptionRespVO>> getSkuOptionList() {
// 获得 SKU 列表

View File

@@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.sku.vo;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@@ -16,54 +15,54 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductSkuBaseVO {
@ApiModelProperty(value = "商品 SKU 名字", required = true, example = "芋道")
@Schema(title = "商品 SKU 名字", required = true, example = "芋道")
@NotEmpty(message = "商品 SKU 名字不能为空")
private String name;
@ApiModelProperty(value = "销售价格,单位:分", required = true, example = "1024", notes = "单位:分")
@Schema(title = "销售价格,单位:分", required = true, example = "1024", description = "单位:分")
@NotNull(message = "销售价格,单位:分不能为空")
private Integer price;
@ApiModelProperty(value = "市场价", example = "1024", notes = "单位:分")
@Schema(title = "市场价", example = "1024", description = "单位:分")
private Integer marketPrice;
@ApiModelProperty(value = "成本价", example = "1024", notes = "单位:分")
@Schema(title = "成本价", example = "1024", description = "单位:分")
private Integer costPrice;
@ApiModelProperty(value = "条形码", example = "haha")
@Schema(title = "条形码", example = "haha")
private String barCode;
@ApiModelProperty(value = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png")
@Schema(title = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png")
@NotNull(message = "图片地址不能为空")
private String picUrl;
@ApiModelProperty(value = "SKU 状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
@Schema(title = "SKU 状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@NotNull(message = "SKU 状态不能为空")
@InEnum(CommonStatusEnum.class)
private Integer status;
@ApiModelProperty(value = "库存", required = true, example = "1")
@Schema(title = "库存", required = true, example = "1")
@NotNull(message = "库存不能为空")
private Integer stock;
@ApiModelProperty(value = "预警预存", example = "1")
@Schema(title = "预警预存", example = "1")
private Integer warnStock;
@ApiModelProperty(value = "商品重量", example = "1", notes = "单位kg 千克")
@Schema(title = "商品重量", example = "1", description = "单位kg 千克")
private Double weight;
@ApiModelProperty(value = "商品体积", example = "1024", notes = "单位m^3 平米")
@Schema(title = "商品体积", example = "1024", description = "单位m^3 平米")
private Double volume;
@ApiModel("规格值")
@Schema(title = "规格值")
@Data
public static class Property {
@ApiModelProperty(value = "属性编号", required = true, example = "1")
@Schema(title = "属性编号", required = true, example = "1")
@NotNull(message = "属性编号不能为空")
private Long propertyId;
@ApiModelProperty(value = "属性值编号", required = true, example = "1024")
@Schema(title = "属性值编号", required = true, example = "1024")
@NotNull(message = "属性值编号不能为空")
private Long valueId;

View File

@@ -1,20 +1,19 @@
package cn.iocoder.yudao.module.product.controller.admin.sku.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.List;
@ApiModel("管理后台 - 商品 SKU 创建/更新 Request VO")
@Schema(title = "管理后台 - 商品 SKU 创建/更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSkuCreateOrUpdateReqVO extends ProductSkuBaseVO {
@ApiModelProperty(value = "商品 SKU 编号", example = "1")
@Schema(title = "商品 SKU 编号", example = "1")
private Long id;
/**

View File

@@ -1,31 +1,30 @@
package cn.iocoder.yudao.module.product.controller.admin.sku.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ApiModel(value = "管理后台 - 商品 SKU 选项 Response VO", description = "用于前端 SELECT 选项")
@Schema(title = "管理后台 - 商品 SKU 选项 Response VO", description = "用于前端 SELECT 选项")
@Data
public class ProductSkuOptionRespVO {
@ApiModelProperty(value = "主键", required = true, example = "1024")
@Schema(title = "主键", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "商品 SKU 名字", example = "红色")
@Schema(title = "商品 SKU 名字", example = "红色")
private String name;
@ApiModelProperty(value = "销售价格", required = true, example = "100", notes = "单位:分")
@Schema(title = "销售价格", required = true, example = "100", description = "单位:分")
private String price;
@ApiModelProperty(value = "库存", required = true, example = "100")
@Schema(title = "库存", required = true, example = "100")
private Integer stock;
// ========== 商品 SPU 信息 ==========
@ApiModelProperty(value = "商品 SPU 编号", required = true, example = "1")
@Schema(title = "商品 SPU 编号", required = true, example = "1")
private Long spuId;
@ApiModelProperty(value = "商品 SPU 名字", required = true, example = "iPhone 11")
@Schema(title = "商品 SPU 名字", required = true, example = "iPhone 11")
private String spuName;
}

View File

@@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.product.controller.admin.sku.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -9,16 +8,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel("管理后台 - 商品 SKU Response VO")
@Schema(title = "管理后台 - 商品 SKU Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSkuRespVO extends ProductSkuBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "1024")
@Schema(title = "主键", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "创建时间")
@Schema(title = "创建时间")
private LocalDateTime createTime;
/**

View File

@@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*;
import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO;
import cn.iocoder.yudao.module.product.service.spu.ProductSpuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -20,7 +20,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 商品 SPU")
@Tag(name = "管理后台 - 商品 SPU")
@RestController
@RequestMapping("/product/spu")
@Validated
@@ -30,14 +30,14 @@ public class ProductSpuController {
private ProductSpuService spuService;
@PostMapping("/create")
@ApiOperation("创建商品 SPU")
@Operation(summary = "创建商品 SPU")
@PreAuthorize("@ss.hasPermission('product:spu:create')")
public CommonResult<Long> createProductSpu(@Valid @RequestBody ProductSpuCreateReqVO createReqVO) {
return success(spuService.createSpu(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新商品 SPU")
@Operation(summary = "更新商品 SPU")
@PreAuthorize("@ss.hasPermission('product:spu:update')")
public CommonResult<Boolean> updateSpu(@Valid @RequestBody ProductSpuUpdateReqVO updateReqVO) {
spuService.updateSpu(updateReqVO);
@@ -45,8 +45,8 @@ public class ProductSpuController {
}
@DeleteMapping("/delete")
@ApiOperation("删除商品 SPU")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除商品 SPU")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('product:spu:delete')")
public CommonResult<Boolean> deleteSpu(@RequestParam("id") Long id) {
spuService.deleteSpu(id);
@@ -55,16 +55,16 @@ public class ProductSpuController {
// TODO 芋艿:修改接口
@GetMapping("/get/detail")
@ApiOperation("获得商品 SPU")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得商品 SPU")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('product:spu:query')")
public CommonResult<ProductSpuDetailRespVO> getSpuDetail(@RequestParam("id") Long id) {
return success(spuService.getSpuDetail(id));
}
@GetMapping("/get")
@ApiOperation("获得商品 SPU")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得商品 SPU")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('product:spu:query')")
public CommonResult<ProductSpuRespVO> getSpu(@RequestParam("id") Long id) {
return success(spuService.getSpu(id));
@@ -72,8 +72,8 @@ public class ProductSpuController {
@GetMapping("/list")
@ApiOperation("获得商品 SPU 列表")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
@Operation(summary = "获得商品 SPU 列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('product:spu:query')")
public CommonResult<List<ProductSpuRespVO>> getSpuList(@RequestParam("ids") Collection<Long> ids) {
List<ProductSpuDO> list = spuService.getSpuList(ids);
@@ -81,7 +81,7 @@ public class ProductSpuController {
}
@GetMapping("/get-simple-list")
@ApiOperation("获得商品 SPU 精简列表")
@Operation(summary = "获得商品 SPU 精简列表")
@PreAuthorize("@ss.hasPermission('product:spu:query')")
public CommonResult<List<ProductSpuSimpleRespVO>> getSpuSimpleList() {
List<ProductSpuDO> list = spuService.getSpuList();
@@ -89,7 +89,7 @@ public class ProductSpuController {
}
@GetMapping("/page")
@ApiOperation("获得商品 SPU 分页")
@Operation(summary = "获得商品 SPU 分页")
@PreAuthorize("@ss.hasPermission('product:spu:query')")
public CommonResult<PageResult<ProductSpuRespVO>> getSpuPage(@Valid ProductSpuPageReqVO pageVO) {
return success(spuService.getSpuPage(pageVO));

View File

@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.product.enums.spu.ProductSpuSpecTypeEnum;
import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@@ -17,75 +17,75 @@ import java.util.List;
@Data
public class ProductSpuBaseVO {
@ApiModelProperty(value = "商品名称", required = true, example = "芋道")
@Schema(title = "商品名称", required = true, example = "芋道")
@NotEmpty(message = "商品名称不能为空")
private String name;
@ApiModelProperty(value = "商品编码", example = "yudaoyuanma")
@Schema(title = "商品编码", example = "yudaoyuanma")
private String code;
@ApiModelProperty(value = "促销语", example = "好吃!")
@Schema(title = "促销语", example = "好吃!")
private String sellPoint;
@ApiModelProperty(value = "商品详情", required = true, example = "我是商品描述")
@Schema(title = "商品详情", required = true, example = "我是商品描述")
@NotNull(message = "商品详情不能为空")
private String description;
@ApiModelProperty(value = "商品分类编号", required = true, example = "1")
@Schema(title = "商品分类编号", required = true, example = "1")
@NotNull(message = "商品分类编号不能为空")
private Long categoryId;
@ApiModelProperty(value = "商品品牌编号", example = "1")
@Schema(title = "商品品牌编号", example = "1")
private Long brandId;
@ApiModelProperty(value = "商品图片的数组", required = true)
@Schema(title = "商品图片的数组", required = true)
@NotNull(message = "商品图片的数组不能为空")
private List<String> picUrls;
@ApiModelProperty(value = "商品视频", required = true)
@Schema(title = "商品视频", required = true)
private String videoUrl;
@ApiModelProperty(value = "排序字段", required = true, example = "1")
@Schema(title = "排序字段", required = true, example = "1")
private Integer sort;
@ApiModelProperty(value = "商品状态", required = true, example = "1", notes = "参见 ProductSpuStatusEnum 枚举类")
@Schema(title = "商品状态", required = true, example = "1", description = "参见 ProductSpuStatusEnum 枚举类")
@NotNull(message = "商品状态不能为空")
@InEnum(ProductSpuStatusEnum.class)
private Integer status;
// ========== SKU 相关字段 =========
@ApiModelProperty(value = "规格类型", required = true, example = "1", notes = "参见 ProductSpuSpecTypeEnum 枚举类")
@Schema(title = "规格类型", required = true, example = "1", description = "参见 ProductSpuSpecTypeEnum 枚举类")
@NotNull(message = "规格类型不能为空")
@InEnum(ProductSpuSpecTypeEnum.class)
private Integer specType;
@ApiModelProperty(value = "是否展示库存", required = true, example = "true")
@Schema(title = "是否展示库存", required = true, example = "true")
@NotNull(message = "是否展示库存不能为空")
private Boolean showStock;
@ApiModelProperty(value = "库存", required = true, example = "true")
@Schema(title = "库存", required = true, example = "true")
private Integer totalStock;
@ApiModelProperty(value = "市场价", example = "1024")
@Schema(title = "市场价", example = "1024")
private Integer marketPrice;
@ApiModelProperty(value = " 最小价格,单位使用:分", required = true, example = "1024")
@Schema(title = " 最小价格,单位使用:分", required = true, example = "1024")
private Integer minPrice;
@ApiModelProperty(value = "最大价格,单位使用:分", required = true, example = "1024")
@Schema(title = "最大价格,单位使用:分", required = true, example = "1024")
private Integer maxPrice;
// ========== 统计相关字段 =========
@ApiModelProperty(value = "商品销量", example = "1024")
@Schema(title = "商品销量", example = "1024")
private Integer salesCount;
@ApiModelProperty(value = "虚拟销量", required = true, example = "1024")
@Schema(title = "虚拟销量", required = true, example = "1024")
@NotNull(message = "虚拟销量不能为空")
private Integer virtualSalesCount;
@ApiModelProperty(value = "点击量", example = "1024")
@Schema(title = "点击量", example = "1024")
private Integer clickCount;
}

View File

@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -9,7 +9,7 @@ import lombok.ToString;
import javax.validation.Valid;
import java.util.List;
@ApiModel("管理后台 - 商品 SPU 创建 Request VO")
@Schema(title = "管理后台 - 商品 SPU 创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import cn.iocoder.yudao.module.product.controller.admin.property.vo.ProductPropertyViewRespVO;
import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuBaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -11,16 +10,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel(value = "管理后台 - 商品 SPU 详细 Response VO", description = "包括关联的 SKU 等信息")
@Schema(title = "管理后台 - 商品 SPU 详细 Response VO", description = "包括关联的 SKU 等信息")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "1")
@Schema(title = "主键", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "创建时间")
@Schema(title = "创建时间")
private LocalDateTime createTime;
/**
@@ -28,7 +27,7 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
*/
private List<Sku> skus;
@ApiModel(value = "管理后台 - 商品 SKU 详细 Response VO")
@Schema(title = "管理后台 - 商品 SKU 详细 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@@ -41,25 +40,25 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
}
@ApiModel(value = "管理后台 - 商品规格的详细 Response VO")
@Schema(title = "管理后台 - 商品规格的详细 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public static class Property extends ProductSkuBaseVO.Property {
@ApiModelProperty(value = "规格的名字", required = true, example = "颜色")
@Schema(title = "规格的名字", required = true, example = "颜色")
private String propertyName;
@ApiModelProperty(value = "规格值的名字", required = true, example = "蓝色")
@Schema(title = "规格值的名字", required = true, example = "蓝色")
private String valueName;
}
@ApiModelProperty(value = "分类 id 数组,一直递归到一级父节点", example = "4")
@Schema(title = "分类 id 数组,一直递归到一级父节点", example = "4")
private Long categoryId;
// TODO @芋艿:在瞅瞅~
@ApiModelProperty(value = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]")
@Schema(title = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]")
private List<ProductPropertyViewRespVO> productPropertyViews;
}

View File

@@ -1,46 +1,45 @@
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 商品 SPU 分页 Request VO")
@Schema(title = "管理后台 - 商品 SPU 分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuPageReqVO extends PageParam {
@ApiModelProperty(value = "商品名称", example = "yutou")
@Schema(title = "商品名称", example = "yutou")
private String name;
@ApiModelProperty(value = "商品编码", example = "yudaoyuanma")
@Schema(title = "商品编码", example = "yudaoyuanma")
private String code;
@ApiModelProperty(value = "分类id", example = "1")
@Schema(title = "分类id", example = "1")
private Long categoryId;
@ApiModelProperty(value = "商品品牌编号", example = "1")
@Schema(title = "商品品牌编号", example = "1")
private Long brandId;
@ApiModelProperty(value = "上下架状态", example = "1", notes = "参见 ProductSpuStatusEnum 枚举值")
@Schema(title = "上下架状态", example = "1", description = "参见 ProductSpuStatusEnum 枚举值")
private Integer status;
@ApiModelProperty(value = "销量最小值", example = "1")
@Schema(title = "销量最小值", example = "1")
private Integer salesCountMin;
@ApiModelProperty(value = "销量最大值", example = "1024")
@Schema(title = "销量最大值", example = "1024")
private Integer salesCountMax;
@ApiModelProperty(value = "市场价最小值", example = "1")
@Schema(title = "市场价最小值", example = "1")
private Integer marketPriceMin;
@ApiModelProperty(value = "市场价最大值", example = "1024")
@Schema(title = "市场价最大值", example = "1024")
private Integer marketPriceMax;
@ApiModelProperty(value = "是否库存告警", example = "true")
@Schema(title = "是否库存告警", example = "true")
private Boolean alarmStock;
}

View File

@@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -9,16 +8,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel("管理后台 - 商品 SPU Response VO")
@Schema(title = "管理后台 - 商品 SPU Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuRespVO extends ProductSpuBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "1")
@Schema(title = "主键", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "创建时间")
@Schema(title = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -1,27 +1,26 @@
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 商品 SPU 精简 Response VO")
@Schema(title = "管理后台 - 商品 SPU 精简 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuSimpleRespVO extends ProductSpuBaseVO {
@ApiModelProperty(value = "主键", required = true, example = "1")
@Schema(title = "主键", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "商品名称", required = true, example = "芋道")
@Schema(title = "商品名称", required = true, example = "芋道")
private String name;
@ApiModelProperty(value = " 最小价格,单位使用:分", required = true, example = "1024")
@Schema(title = " 最小价格,单位使用:分", required = true, example = "1024")
private Integer minPrice;
@ApiModelProperty(value = "最大价格,单位使用:分", required = true, example = "1024")
@Schema(title = "最大价格,单位使用:分", required = true, example = "1024")
private Integer maxPrice;
}

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -11,13 +10,13 @@ import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 商品 SPU 更新 Request VO")
@Schema(title = "管理后台 - 商品 SPU 更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuUpdateReqVO extends ProductSpuBaseVO {
@ApiModelProperty(value = "商品编号", required = true, example = "1")
@Schema(title = "商品编号", required = true, example = "1")
@NotNull(message = "商品编号不能为空")
private Long id;

View File

@@ -5,8 +5,8 @@ import cn.iocoder.yudao.module.product.controller.app.category.vo.AppCategoryRes
import cn.iocoder.yudao.module.product.convert.category.ProductCategoryConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO;
import cn.iocoder.yudao.module.product.service.category.ProductCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -18,7 +18,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "用户 APP - 商品分类")
@Tag(name = "用户 APP - 商品分类")
@RestController
@RequestMapping("/product/category")
@Validated
@@ -28,7 +28,7 @@ public class AppCategoryController {
private ProductCategoryService categoryService;
@GetMapping("/list")
@ApiOperation("获得商品分类列表")
@Operation(summary = "获得商品分类列表")
public CommonResult<List<AppCategoryRespVO>> getProductCategoryList() {
List<ProductCategoryDO> list = categoryService.getEnableCategoryList();
list.sort(Comparator.comparing(ProductCategoryDO::getSort));

View File

@@ -1,28 +1,27 @@
package cn.iocoder.yudao.module.product.controller.app.category.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
@ApiModel(value = "用户 APP - 商品分类 Response VO")
@Schema(title = "用户 APP - 商品分类 Response VO")
public class AppCategoryRespVO {
@ApiModelProperty(value = "分类编号", required = true, example = "2")
@Schema(title = "分类编号", required = true, example = "2")
private Long id;
@ApiModelProperty(value = "父分类编号", required = true, example = "1")
@Schema(title = "父分类编号", required = true, example = "1")
@NotNull(message = "父分类编号不能为空")
private Long parentId;
@ApiModelProperty(value = "分类名称", required = true, example = "办公文具")
@Schema(title = "分类名称", required = true, example = "办公文具")
@NotBlank(message = "分类名称不能为空")
private String name;
@ApiModelProperty(value = "分类图片", required = true)
@Schema(title = "分类图片", required = true)
@NotBlank(message = "分类图片不能为空")
private String picUrl;

View File

@@ -7,8 +7,8 @@ import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageReqVO;
import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageRespVO;
import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuRespVO;
import cn.iocoder.yudao.module.product.service.spu.ProductSpuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -20,7 +20,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "用户 APP - 商品spu")
@Tag(name = "用户 APP - 商品spu")
@RestController
@RequestMapping("/product/spu")
@Validated
@@ -30,13 +30,13 @@ public class AppProductSpuController {
private ProductSpuService spuService;
@GetMapping("/page")
@ApiOperation("获得商品spu分页")
@Operation(summary = "获得商品spu分页")
public CommonResult<PageResult<AppSpuPageRespVO>> getSpuPage(@Valid AppSpuPageReqVO pageVO) {
return success(spuService.getSpuPage(pageVO));
}
@GetMapping("/")
@ApiOperation("获取商品 - 通过商品id")
@Operation(summary = "获取商品 - 通过商品id")
public CommonResult<AppSpuRespVO> getSpu(@RequestParam("spuId") Long spuId) {
AppSpuRespVO appSpuRespVO = BeanUtil.toBean(spuService.getSpu(spuId), AppSpuRespVO.class);
return success(appSpuRespVO);

View File

@@ -1,18 +1,17 @@
package cn.iocoder.yudao.module.product.controller.app.spu.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("App - 商品spu分页 Request VO")
@Schema(title = "App - 商品spu分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AppSpuPageReqVO extends PageParam {
@ApiModelProperty(value = "分类id")
@Schema(title = "分类id")
private Long categoryId;
}

View File

@@ -1,52 +1,51 @@
package cn.iocoder.yudao.module.product.controller.app.spu.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("App - 商品spu分页 Request VO")
@Schema(title = "App - 商品spu分页 Request VO")
@Data
public class AppSpuPageRespVO {
@ApiModelProperty(value = "主键", required = true, example = "1")
@Schema(title = "主键", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "商品名称")
@Schema(title = "商品名称")
private String name;
@ApiModelProperty(value = "卖点", required = true)
@Schema(title = "卖点", required = true)
@NotNull(message = "卖点不能为空")
private String sellPoint;
@ApiModelProperty(value = "描述", required = true)
@Schema(title = "描述", required = true)
@NotNull(message = "描述不能为空")
private String description;
@ApiModelProperty(value = "分类id", required = true)
@Schema(title = "分类id", required = true)
@NotNull(message = "分类id不能为空")
private Long categoryId;
@ApiModelProperty(value = "商品主图地址,* 数组,以逗号分隔,最多上传15张", required = true)
@Schema(title = "商品主图地址,* 数组,以逗号分隔,最多上传15张", required = true)
@NotNull(message = "商品主图地址,* 数组,以逗号分隔,最多上传15张不能为空")
private List<String> picUrls;
@ApiModelProperty(value = "排序字段", required = true)
@Schema(title = "排序字段", required = true)
@NotNull(message = "排序字段不能为空")
private Integer sort;
@ApiModelProperty(value = "点赞初始人数")
@Schema(title = "点赞初始人数")
private Integer likeCount;
@ApiModelProperty(value = "价格 单位使用:分")
@Schema(title = "价格 单位使用:分")
private Integer price;
@ApiModelProperty(value = "库存数量")
@Schema(title = "库存数量")
private Integer quantity;
@ApiModelProperty(value = "上下架状态: 0 上架(开启) 1 下架(禁用)")
@Schema(title = "上下架状态: 0 上架(开启) 1 下架(禁用)")
private Integer status;
}

View File

@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.product.controller.app.spu.vo;
import cn.iocoder.yudao.module.product.controller.admin.spu.vo.ProductSpuRespVO;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
*
* @author LuoWenFeng
*/
@ApiModel("App - 商品spu Response VO")
@Schema(title = "App - 商品spu Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class AppSpuRespVO extends ProductSpuRespVO {