|
@@ -1,9 +1,14 @@
|
|
|
package com.backendsys.modules.ai.material.controller;
|
|
|
|
|
|
+import com.backendsys.modules.ai.material.entity.MaterialCategory;
|
|
|
import com.backendsys.modules.ai.material.service.MaterialCategoryService;
|
|
|
+import com.backendsys.modules.common.utils.Result;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@Validated
|
|
@@ -14,6 +19,18 @@ public class MaterialCategoryController {
|
|
|
@Autowired
|
|
|
private MaterialCategoryService materialCategoryService;
|
|
|
|
|
|
-
|
|
|
+ @Operation(summary = "获取素材分类列表")
|
|
|
+// @PreAuthorize("@sr.hasPermission('31')")
|
|
|
+ @GetMapping("/api/ai/material/getMaterialCategoryList")
|
|
|
+ public Result getMaterialCategoryList(MaterialCategory materialCategory) {
|
|
|
+ return Result.success().put("data", materialCategoryService.selectMaterialCategoryList(materialCategory));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Operation(summary = "获取素材分类列表(下拉)")
|
|
|
+// @PreAuthorize("@sr.hasPermission('31')")
|
|
|
+ @GetMapping("/api/ai/material/getMaterialCategoryPopover")
|
|
|
+ public Result getMaterialCategoryPopover() {
|
|
|
+ return Result.success().put("data", materialCategoryService.selectMaterialCategoryPopover());
|
|
|
+ }
|
|
|
|
|
|
}
|