Browse Source

tj

master
DESKTOP-8FESTBI\Administrator 8 months ago
parent
commit
d04a39789f

+ 8
- 7
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/controller/CategoryController.java View File

4
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.common.core.domain.AjaxResult;
5
 import com.ruoyi.novel.domain.NovelCategory;
5
 import com.ruoyi.novel.domain.NovelCategory;
6
 import com.ruoyi.novel.service.NovelCategoryService;
6
 import com.ruoyi.novel.service.NovelCategoryService;
7
+import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.beans.factory.annotation.Qualifier;
8
 import org.springframework.beans.factory.annotation.Qualifier;
8
 import org.springframework.web.bind.annotation.GetMapping;
9
 import org.springframework.web.bind.annotation.GetMapping;
9
 import org.springframework.web.bind.annotation.RequestMapping;
10
 import org.springframework.web.bind.annotation.RequestMapping;
16
 @RestController
17
 @RestController
17
 @RequestMapping("/category")
18
 @RequestMapping("/category")
18
 public class CategoryController extends BaseController {
19
 public class CategoryController extends BaseController {
19
-//    @Autowired
20
-//    private NovelCategoryService categoryService;
21
-    private final NovelCategoryService categoryService;
22
-
23
-    public CategoryController(@Qualifier("categoryService") NovelCategoryService categoryService) {
24
-        this.categoryService = categoryService;
25
-    }
20
+    @Autowired
21
+    private NovelCategoryService categoryService;
22
+//    private final NovelCategoryService categoryService;
23
+//
24
+//    public CategoryController(@Qualifier("novelCategoryService") NovelCategoryService categoryService) {
25
+//        this.categoryService = categoryService;
26
+//    }
26
     @GetMapping("/tree")
27
     @GetMapping("/tree")
27
     public AjaxResult tree() {
28
     public AjaxResult tree() {
28
         List<NovelCategory> categories = categoryService.getCategoryTree();
29
         List<NovelCategory> categories = categoryService.getCategoryTree();

Loading…
Cancel
Save