商品分类的迁移,继续未完成,继续先提交下~

This commit is contained in:
YunaiV
2020-07-25 00:10:10 +08:00
parent b209505f99
commit a99afdc833
44 changed files with 731 additions and 674 deletions

View File

@@ -1,69 +0,0 @@
package cn.iocoder.mall.product.rest.convert.category;
import cn.iocoder.mall.product.biz.bo.category.ProductCategoryBO;
import cn.iocoder.mall.product.biz.dto.category.ProductCategoryAddDTO;
import cn.iocoder.mall.product.biz.dto.category.ProductCategoryDeleteDTO;
import cn.iocoder.mall.product.biz.dto.category.ProductCategoryUpdateDTO;
import cn.iocoder.mall.product.biz.dto.category.ProductCategoryUpdateStatusDTO;
import cn.iocoder.mall.product.rest.request.category.AdminsProductCategoryAddRequest;
import cn.iocoder.mall.product.rest.request.category.AdminsProductCategoryUpdateRequest;
import cn.iocoder.mall.product.rest.request.category.AdminsProductCategoryUpdateStatusRequest;
import cn.iocoder.mall.product.rest.response.category.AdminsProductCategoryAddResponse;
import cn.iocoder.mall.product.rest.response.category.AdminsProductCategoryTreeNodeResponse;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* @Author: jiangweifan
* @Date: 2020/5/6
* @Description: 管理员 - 商品分类 - API层数据转换
*/
@Mapper
public interface AdminsProductCategoryConvert {
AdminsProductCategoryConvert INSTANCE = Mappers.getMapper(AdminsProductCategoryConvert.class);
/**
* 商品分类列表 - BO转换Response
* @param productCategoryAllListBO
* @return
*/
AdminsProductCategoryTreeNodeResponse convertToTreeNodeResponse(ProductCategoryBO productCategoryAllListBO);
/**
* 新增商品分类 - Request转DTO
* @param adminsProductCategoryAddRequest
* @return
*/
ProductCategoryAddDTO convertToAddDTO(Integer adminId, AdminsProductCategoryAddRequest adminsProductCategoryAddRequest);
/**
* 新增商品分类 - BO转Response
* @param productCategoryAddBO
* @return
*/
AdminsProductCategoryAddResponse convertToAddResponse(ProductCategoryBO productCategoryAddBO);
/**
* 更新商品分类 - Request转DTO
* @param adminsProductCategoryUpdateRequest
* @return
*/
ProductCategoryUpdateDTO convertToUpdateDTO(Integer adminId, AdminsProductCategoryUpdateRequest adminsProductCategoryUpdateRequest);
/**
* 更新商品分类状态 - Request转DTO
* @param adminsProductCategoryUpdateStatusRequest
* @return
*/
ProductCategoryUpdateStatusDTO convertToUpdateStatusDTO(Integer adminId, AdminsProductCategoryUpdateStatusRequest adminsProductCategoryUpdateStatusRequest);
/**
* 删除商品分类 - Request转DTO
* @param adminId 管理员id
* @param id 商品分类id
* @return
*/
ProductCategoryDeleteDTO convertToDeleteDTO(Integer adminId, Integer id);
}

View File

@@ -1,38 +0,0 @@
package cn.iocoder.mall.product.rest.request.category;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: jiangweifan
* @Date: 2020/5/6
* @Description: 管理员 - 商品分类 - 创建商品分类Request
*/
@ApiModel("创建商品分类Request")
@Data
@Accessors(chain = true)
public class AdminsProductCategoryAddRequest {
@ApiModelProperty(name = "pid", value = "父级分类编号", required = true, example = "1")
@NotNull(message = "父分类编号不能为空")
private Integer pid;
@ApiModelProperty(name = "name", value = "分类名字(标识)", required = true, example = "admin/info")
@NotNull(message = "名称不能为空")
private String name;
@ApiModelProperty(name = "description", value = "描述", required = true, example = "1")
@NotNull(message = "描述不能为空")
private String description;
@ApiModelProperty(name = "picUrl", value = "分类图片", example = "http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg/")
private String picUrl;
@ApiModelProperty(name = "sort", value = "排序", required = true, example = "1")
@NotNull(message = "排序值不能为空")
private Integer sort;
}

View File

@@ -1,42 +0,0 @@
package cn.iocoder.mall.product.rest.request.category;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: jiangweifan
* @Date: 2020/5/6
* @Description: 管理员 - 商品分类 - 更新商品分类Request
*/
@ApiModel("更新商品分类Request")
@Data
@Accessors(chain = true)
public class AdminsProductCategoryUpdateRequest {
@ApiModelProperty(name = "id", value = "分类编号", required = true, example = "1")
@NotNull(message = "编号不能为空")
private Integer id;
@ApiModelProperty(name = "pid", value = "父级分类编号", required = true, example = "1")
@NotNull(message = "父分类编号不能为空")
private Integer pid;
@ApiModelProperty(name = "name", value = "分类名字(标识)", required = true, example = "admin/info")
@NotNull(message = "名称不能为空")
private String name;
@ApiModelProperty(name = "description", value = "描述", required = true, example = "1")
@NotNull(message = "描述不能为空")
private String description;
@ApiModelProperty(name = "picUrl", value = "分类图片", example = "http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg/")
private String picUrl;
@ApiModelProperty(name = "sort", value = "排序", required = true, example = "1")
@NotNull(message = "排序值不能为空")
private Integer sort;
}

View File

@@ -1,27 +0,0 @@
package cn.iocoder.mall.product.rest.request.category;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: jiangweifan
* @Date: 2020/5/6
* @Description: 管理员 - 商品分类 - 更新商品分类状态Request
*/
@ApiModel("更新商品分类状态Request")
@Data
@Accessors(chain = true)
public class AdminsProductCategoryUpdateStatusRequest {
@ApiModelProperty(name = "id", value = "分类编号", required = true, example = "1")
@NotNull(message = "编号不能为空")
private Integer id;
@ApiModelProperty(name = "status", value = "状态。1 - 开启2 - 禁用", required = true, example = "1")
@NotNull(message = "状态不能为空")
private Integer status;
}