商品规格接口
This commit is contained in:
@@ -3,17 +3,30 @@ package cn.iocoder.mall.product.rest.controller.admins;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrBO;
|
||||
import cn.iocoder.mall.product.biz.dto.attr.AdminProductAttrPageDTO;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrSimpleWithValueBO;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrValueBO;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrWithValueBO;
|
||||
import cn.iocoder.mall.product.biz.dto.attr.*;
|
||||
import cn.iocoder.mall.product.biz.service.product.ProductAttrService;
|
||||
import cn.iocoder.mall.product.rest.convert.attr.ProductAttrConvert;
|
||||
import cn.iocoder.mall.product.rest.request.attr.AdminProductAttrPageRequest;
|
||||
import cn.iocoder.mall.product.rest.request.attr.ProductAttrAddRequest;
|
||||
import cn.iocoder.mall.product.rest.request.attr.ProductAttrUpdateRequest;
|
||||
import cn.iocoder.mall.product.rest.request.attr.ProductAttrValueAddRequest;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrPageResponse;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrSimpleResponse;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrVO;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrValueResponse;
|
||||
import cn.iocoder.mall.security.core.context.AdminSecurityContextHolder;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格
|
||||
@@ -34,100 +47,88 @@ public class AdminsProductAttrController {
|
||||
@ApiOperation("获得规格分页")
|
||||
public CommonResult<PageResult<AdminsProductAttrPageResponse>> attrPage(AdminProductAttrPageRequest request) {
|
||||
AdminProductAttrPageDTO pageDTO = ProductAttrConvert.INSTANCE.convert(request);
|
||||
PageResult<ProductAttrBO> productAttrPage = productAttrService.getProductAttrPage(pageDTO);
|
||||
PageResult<ProductAttrWithValueBO> productAttrPage = productAttrService.getProductAttrPage(pageDTO);
|
||||
PageResult<AdminsProductAttrPageResponse> adminPageResponse = ProductAttrConvert.INSTANCE.convertPage(productAttrPage);
|
||||
return CommonResult.success(adminPageResponse);
|
||||
}
|
||||
|
||||
// @GetMapping("/attr/tree")
|
||||
// @ApiOperation(value = "获得规格树结构", notes = "该接口返回的信息更为精简。一般用于前端缓存数据字典到本地。")
|
||||
// public CommonResult<List<AdminsProductAttrSimpleVO>> tree() {
|
||||
// // 查询全列表
|
||||
// List<ProductAttrSimpleBO> result = productAttrService.getProductAttrList();
|
||||
// // 返回结果
|
||||
// return success(ProductAttrConvert.INSTANCE.convert(result));
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/attr/add")
|
||||
// @ApiOperation(value = "创建商品规格")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "name", value = "规格名", required = true, example = "颜色")
|
||||
// })
|
||||
// public CommonResult<AdminsProductAttrVO> addAttr(@RequestParam("name") String name) {
|
||||
// // 创建 ProductAttrAddDTO 对象
|
||||
// ProductAttrAddDTO productAttrAddDTO = new ProductAttrAddDTO().setName(name);
|
||||
// // 添加
|
||||
// ProductAttrBO result = productAttrService.addProductAttr(AdminSecurityContextHolder.getContext().getAdminId(), productAttrAddDTO);
|
||||
// // 返回结果
|
||||
// return success(ProductAttrConvert.INSTANCE.convert3(result));
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/attr/update")
|
||||
// @ApiOperation(value = "修改商品规格")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "规格编号", required = true, example = "1"),
|
||||
// @ApiImplicitParam(name = "name", value = "规格名", required = true, example = "颜色")
|
||||
// })
|
||||
// public CommonResult<Boolean> updateAttr(@RequestParam("id") Integer id,
|
||||
// @RequestParam("name") String name) {
|
||||
// // 创建 ProductAttrUpdateDTO 对象
|
||||
// ProductAttrUpdateDTO productAttrUpdateDTO = new ProductAttrUpdateDTO().setId(id).setName(name);
|
||||
// // 更新
|
||||
// return success(productAttrService.updateProductAttr(AdminSecurityContextHolder.getContext().getAdminId(), productAttrUpdateDTO));
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/attr/update_status")
|
||||
// @ApiOperation(value = "修改商品规格状态")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "规格编号", required = true, example = "100"),
|
||||
// @ApiImplicitParam(name = "status", value = "状态", required = true, example = "1")
|
||||
// })
|
||||
// public CommonResult<Boolean> updateAttrStatus(@RequestParam("id") Integer id,
|
||||
// @RequestParam("status") Integer status) {
|
||||
// return success(productAttrService.updateProductAttrStatus(AdminSecurityContextHolder.getContext().getAdminId(), id, status));
|
||||
// }
|
||||
//
|
||||
// // TODO 芋艿 暂时不考虑 delete Attr 。因为关联逻辑比较多
|
||||
//
|
||||
// @PostMapping("/attr_value/add")
|
||||
// @ApiOperation(value = "创建商品规格值")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "attrId", value = "规格编号", required = true, example = "100"),
|
||||
// @ApiImplicitParam(name = "name", value = "规格值", required = true, example = "蓝色")
|
||||
// })
|
||||
// public CommonResult<AdminsProductAttrValueVO> addAttrValue(@RequestParam("attrId") Integer attrId,
|
||||
// @RequestParam("name") String name) {
|
||||
// // 创建 ProductAttrValueAddDTO 对象
|
||||
// ProductAttrValueAddDTO productAttrValueAddDTO = new ProductAttrValueAddDTO().setAttrId(attrId).setName(name);
|
||||
// // 添加
|
||||
// ProductAttrValueBO result = productAttrService.addProductAttrValue(AdminSecurityContextHolder.getContext().getAdminId(), productAttrValueAddDTO);
|
||||
// // 返回结果
|
||||
// return success(ProductAttrConvert.INSTANCE.convert4(result));
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/attr_value/update")
|
||||
// @ApiOperation(value = "修改商品规格值")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "规格值编号", required = true, example = "100"),
|
||||
// @ApiImplicitParam(name = "name", value = "规格值", required = true, example = "蓝色")
|
||||
// })
|
||||
// public CommonResult<Boolean> updateAttrValue(@RequestParam("id") Integer id,
|
||||
// @RequestParam("name") String name) {
|
||||
// // 创建 ProductAttrValueUpdateDTO 对象
|
||||
// ProductAttrValueUpdateDTO productAttrValueUpdateDTO = new ProductAttrValueUpdateDTO().setId(id).setName(name);
|
||||
// // 更新
|
||||
// return success(productAttrService.updateProductAttrValue(AdminSecurityContextHolder.getContext().getAdminId(), productAttrValueUpdateDTO));
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/attr_value/update_status")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "规格编号", required = true, example = "100"),
|
||||
// @ApiImplicitParam(name = "status", value = "状态", required = true, example = "1")
|
||||
// })
|
||||
// public CommonResult<Boolean> updateAttrValueStatus(@RequestParam("id") Integer id,
|
||||
// @RequestParam("status") Integer status) {
|
||||
// return success(productAttrService.updateProductAttrValueStatus(AdminSecurityContextHolder.getContext().getAdminId(), id, status));
|
||||
// }
|
||||
@GetMapping("/attr/tree")
|
||||
@ApiOperation(value = "获得规格树结构", notes = "该接口返回的信息更为精简。一般用于前端缓存数据字典到本地。")
|
||||
public CommonResult<List<AdminsProductAttrSimpleResponse>> tree() {
|
||||
// 查询全列表
|
||||
List<ProductAttrSimpleWithValueBO> result = productAttrService.getProductAttrList();
|
||||
return CommonResult.success(ProductAttrConvert.INSTANCE.convertSimple(result));
|
||||
}
|
||||
|
||||
@PostMapping("/attr/add")
|
||||
@ApiOperation(value = "创建商品规格")
|
||||
public CommonResult<AdminsProductAttrVO> addAttr(@Validated ProductAttrAddRequest addRequest) {
|
||||
// 创建 ProductAttrAddDTO 对象
|
||||
ProductAttrAddDTO productAttrAddDTO = new ProductAttrAddDTO().setName(addRequest.getName());
|
||||
// 添加
|
||||
ProductAttrBO result = productAttrService.addProductAttr(AdminSecurityContextHolder.getContext().getAdminId(), productAttrAddDTO);
|
||||
return CommonResult.success(ProductAttrConvert.INSTANCE.convertAttr(result));
|
||||
}
|
||||
|
||||
@PostMapping("/attr/update")
|
||||
@ApiOperation(value = "修改商品规格")
|
||||
public CommonResult<Boolean> updateAttr(@Validated ProductAttrUpdateRequest updateRequest) {
|
||||
ProductAttrUpdateDTO productAttrUpdateDTO = ProductAttrConvert.INSTANCE.convertUpdate(updateRequest);
|
||||
// 更新
|
||||
return CommonResult.success(productAttrService.updateProductAttr(AdminSecurityContextHolder.getContext().getAdminId(), productAttrUpdateDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/attr/update_status")
|
||||
@ApiOperation(value = "修改商品规格状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "规格编号", required = true, example = "100"),
|
||||
@ApiImplicitParam(name = "status", value = "状态", required = true, example = "1")
|
||||
})
|
||||
public CommonResult<Boolean> updateAttrStatus(@RequestParam("id") Integer id,
|
||||
@RequestParam("status") Integer status) {
|
||||
return CommonResult.success(productAttrService.updateProductAttrStatus(AdminSecurityContextHolder.getContext().getAdminId(), id, status));
|
||||
}
|
||||
|
||||
// TODO 芋艿 暂时不考虑 delete Attr 。因为关联逻辑比较多
|
||||
|
||||
@PostMapping("/attr_value/add")
|
||||
@ApiOperation(value = "创建商品规格值")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "attrId", value = "规格编号", required = true, example = "100"),
|
||||
@ApiImplicitParam(name = "name", value = "规格值", required = true, example = "蓝色")
|
||||
})
|
||||
public CommonResult<AdminsProductAttrValueResponse> addAttrValue(@Validated ProductAttrValueAddRequest addRequest) {
|
||||
// 创建 ProductAttrValueAddDTO 对象
|
||||
ProductAttrValueAddDTO productAttrValueAddDTO = new ProductAttrValueAddDTO().setAttrId(addRequest.getAttrId()).setName(addRequest.getName());
|
||||
// 添加
|
||||
ProductAttrValueBO result = productAttrService.addProductAttrValue(AdminSecurityContextHolder.getContext().getAdminId(), productAttrValueAddDTO);
|
||||
// 返回结果
|
||||
return CommonResult.success(ProductAttrConvert.INSTANCE.convertAddResponse(result));
|
||||
}
|
||||
|
||||
@PostMapping("/attr_value/update")
|
||||
@ApiOperation(value = "修改商品规格值")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "规格值编号", required = true, example = "100"),
|
||||
@ApiImplicitParam(name = "name", value = "规格值", required = true, example = "蓝色")
|
||||
})
|
||||
public CommonResult<Boolean> updateAttrValue(@RequestParam("id") Integer id,
|
||||
@RequestParam("name") String name) {
|
||||
// 创建 ProductAttrValueUpdateDTO 对象
|
||||
ProductAttrValueUpdateDTO productAttrValueUpdateDTO = new ProductAttrValueUpdateDTO().setId(id).setName(name);
|
||||
// 更新
|
||||
return CommonResult.success(productAttrService.updateProductAttrValue(AdminSecurityContextHolder.getContext().getAdminId(), productAttrValueUpdateDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/attr_value/update_status")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "规格编号", required = true, example = "100"),
|
||||
@ApiImplicitParam(name = "status", value = "状态", required = true, example = "1")
|
||||
})
|
||||
public CommonResult<Boolean> updateAttrValueStatus(@RequestParam("id") Integer id,
|
||||
@RequestParam("status") Integer status) {
|
||||
return CommonResult.success(productAttrService.updateProductAttrValueStatus(AdminSecurityContextHolder.getContext().getAdminId(), id, status));
|
||||
}
|
||||
|
||||
// TODO 芋艿 暂时不考虑 delete Attr Value 。因为关联逻辑比较多
|
||||
|
||||
|
||||
@@ -2,18 +2,44 @@ package cn.iocoder.mall.product.rest.convert.attr;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrBO;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrSimpleWithValueBO;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrValueBO;
|
||||
import cn.iocoder.mall.product.biz.bo.attr.ProductAttrWithValueBO;
|
||||
import cn.iocoder.mall.product.biz.dto.attr.AdminProductAttrPageDTO;
|
||||
import cn.iocoder.mall.product.biz.dto.attr.ProductAttrUpdateDTO;
|
||||
import cn.iocoder.mall.product.rest.request.attr.AdminProductAttrPageRequest;
|
||||
import cn.iocoder.mall.product.rest.request.attr.ProductAttrUpdateRequest;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrPageResponse;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrSimpleResponse;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrVO;
|
||||
import cn.iocoder.mall.product.rest.response.attr.AdminsProductAttrValueResponse;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProductAttrConvert {
|
||||
|
||||
ProductAttrConvert INSTANCE = Mappers.getMapper(ProductAttrConvert.class);
|
||||
|
||||
@Mappings({})
|
||||
AdminProductAttrPageDTO convert(AdminProductAttrPageRequest bean);
|
||||
|
||||
PageResult<AdminsProductAttrPageResponse> convertPage(PageResult<ProductAttrBO> productAttrPage);
|
||||
@Mappings({})
|
||||
PageResult<AdminsProductAttrPageResponse> convertPage(PageResult<ProductAttrWithValueBO> productAttrPage);
|
||||
|
||||
@Mappings({})
|
||||
List<AdminsProductAttrSimpleResponse> convertSimple(List<ProductAttrSimpleWithValueBO> simpleList);
|
||||
|
||||
@Mappings({})
|
||||
AdminsProductAttrVO convertAttr(ProductAttrBO attrBO);
|
||||
|
||||
@Mappings({})
|
||||
ProductAttrUpdateDTO convertUpdate(ProductAttrUpdateRequest updateRequest);
|
||||
|
||||
@Mappings({})
|
||||
AdminsProductAttrValueResponse convertAddResponse(ProductAttrValueBO result);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.iocoder.mall.product.rest.request.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* 规格添加
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrAddRequest {
|
||||
|
||||
@ApiModelProperty(name = "name", value = "规格名", required = true, example = "颜色")
|
||||
@NotEmpty(message = "规格名不能为空")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.mall.product.rest.request.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 规格修改
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrUpdateRequest {
|
||||
|
||||
@ApiModelProperty(name = "id", value = "规格编号", required = true, example = "1")
|
||||
@NotNull(message = "规格编号不能为空")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(name = "name", value = "规格名", required = true, example = "颜色")
|
||||
@NotEmpty(message = "规格名不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.mall.product.rest.request.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 规格值添加 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueAddRequest {
|
||||
|
||||
@ApiModelProperty(name = "attrId", value = "规格编号", required = true, example = "1")
|
||||
@NotNull(message = "规格编号不能为空")
|
||||
private Integer attrId;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(name = "name", value = "规格值名", required = true, example = "红色")
|
||||
@NotEmpty(message = "规格值名不能为空")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.mall.product.rest.request.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 规格值修改 DTO
|
||||
* <p>
|
||||
* 注意,不允许修改所属规格
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueUpdateRequest {
|
||||
|
||||
@ApiModelProperty(name = "id", value = "规格值编号", required = true, example = "1")
|
||||
@NotNull(message = "规格值编号不能为空")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(name = "id", value = "规格值编号", required = true, example = "1")
|
||||
@NotEmpty(message = "规格名不能为空")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.mall.product.rest.response.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "商品规格精简 VO", description = "带有规格值数组")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdminsProductAttrSimpleResponse {
|
||||
|
||||
@ApiModelProperty(value = "规格编号", required = true, example = "1")
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "规格名", required = true, example = "颜色")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "规格值数组", required = true)
|
||||
private List<ProductAttrValue> values;
|
||||
|
||||
@ApiModel("规格值")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class ProductAttrValue {
|
||||
|
||||
/**
|
||||
* 规格值编号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格值编号", required = true, example = "1")
|
||||
private Integer id;
|
||||
/**
|
||||
* 规格值名
|
||||
*/
|
||||
@ApiModelProperty(value = "规格值名", required = true, example = "小")
|
||||
private String name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.iocoder.mall.product.rest.response.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value = "商品规格 VO", description = "不带有规格值数组")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdminsProductAttrVO {
|
||||
|
||||
@ApiModelProperty(value = "规格编号", required = true, example = "1")
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "规格名", required = true, example = "颜色")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "创建时间", required = true, example = "时间戳")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.mall.product.rest.response.attr;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value = "商品规格值 VO")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdminsProductAttrValueResponse {
|
||||
|
||||
@ApiModelProperty(value = "规格值编号", required = true, example = "1")
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "规格编号", required = true, example = "1")
|
||||
private Integer attrId;
|
||||
@ApiModelProperty(value = "规格名", required = true, example = "颜色")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "创建时间", required = true, example = "时间戳")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user