From 6b6be6814f73326390c2dc8ecbd7100ef439da5b Mon Sep 17 00:00:00 2001 From: zcy9999 <1328476842@qq.com> Date: Sat, 11 Jun 2022 11:46:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4public?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../latticy/controller/v1/CategoryController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/github/talelin/latticy/controller/v1/CategoryController.java b/src/main/java/io/github/talelin/latticy/controller/v1/CategoryController.java index 91b8971..8c92fd3 100644 --- a/src/main/java/io/github/talelin/latticy/controller/v1/CategoryController.java +++ b/src/main/java/io/github/talelin/latticy/controller/v1/CategoryController.java @@ -38,14 +38,14 @@ public class CategoryController { @GetMapping("/page") @PermissionMeta(value = "品类列表查询", mount = false) @GroupRequired - private PageResponseVO getCategoryPage(CategoryPageDTO categoryPageDTO) { + public PageResponseVO getCategoryPage(CategoryPageDTO categoryPageDTO) { return PageUtil.build(categoryService.getCategoryPage(categoryPageDTO)); } @PostMapping("") @GroupRequired @PermissionMeta(value = "新增品类", mount = false) - private CreatedVO createCategory(@RequestBody CategoryDTO categoryDTO) { + public CreatedVO createCategory(@RequestBody CategoryDTO categoryDTO) { categoryService.createCategory(categoryDTO); return new CreatedVO(); } @@ -53,7 +53,7 @@ public class CategoryController { @PutMapping("/{id}") @GroupRequired @PermissionMeta(value = "修改品类", mount = false) - private UpdatedVO updateCategory(@PathVariable @Positive(message = "{category.id}") Integer id, @RequestBody UpdateCategoryDTO categoryDTO) { + public UpdatedVO updateCategory(@PathVariable @Positive(message = "{category.id}") Integer id, @RequestBody UpdateCategoryDTO categoryDTO) { categoryService.updateCategory(id, categoryDTO); return new UpdatedVO(); } @@ -61,14 +61,14 @@ public class CategoryController { @DeleteMapping("/{id}") @GroupRequired @PermissionMeta(value = "删除品类", mount = false) - private DeletedVO deleteCategory(@PathVariable @Positive(message = "{category.id}") Integer id) { + public DeletedVO deleteCategory(@PathVariable @Positive(message = "{category.id}") Integer id) { categoryService.deleteCategory(id); return new DeletedVO(); } @GetMapping("/getCategoryTree") @PermissionMeta(value = "查询树形结构", mount = false) - private List getCategoryTree() { + public List getCategoryTree() { return categoryService.getCategoryTree(); } } -- Gitee From a0d85ec36472110d1bde0364f3487808c7fdd74a Mon Sep 17 00:00:00 2001 From: zcy9999 <1328476842@qq.com> Date: Sat, 11 Jun 2022 11:48:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E9=9D=9E=E7=A9=BA?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../github/talelin/latticy/dto/category/UpdateCategoryDTO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/io/github/talelin/latticy/dto/category/UpdateCategoryDTO.java b/src/main/java/io/github/talelin/latticy/dto/category/UpdateCategoryDTO.java index fdb1c23..859bd57 100644 --- a/src/main/java/io/github/talelin/latticy/dto/category/UpdateCategoryDTO.java +++ b/src/main/java/io/github/talelin/latticy/dto/category/UpdateCategoryDTO.java @@ -2,6 +2,7 @@ package io.github.talelin.latticy.dto.category; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -17,11 +18,13 @@ public class UpdateCategoryDTO implements Serializable { /** * 品类名称 */ + @NotBlank(message = "{category.category-name}") private String categoryName; /** * 品类英文名称 */ + @NotBlank(message = "{category.category-english-name}") private String categoryEnglishName; } -- Gitee