分类API接口代码完善
This commit is contained in:
parent
a3d73bf7ad
commit
f3f3d3f936
@ -8,6 +8,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
@ -37,6 +38,7 @@ public class Category extends BaseEntity {
|
||||
private String parentId;
|
||||
|
||||
@NotNull(message = "层级不能为空")
|
||||
@Min(value = 0,message = "层级需要大于0")
|
||||
@ApiModelProperty(value = "层级, 从0开始")
|
||||
private Integer level;
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class CategoryManagerController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "goodsId", value = "分类ID", required = true, paramType = "path", dataType = "String")
|
||||
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String")
|
||||
@ApiOperation(value = "通过id删除分类")
|
||||
public ResultMessage<Category> delAllByIds(@NotNull @PathVariable String id) {
|
||||
Category category = new Category();
|
||||
|
Loading…
x
Reference in New Issue
Block a user