|
|
@@ -0,0 +1,28 @@
|
|
|
+package com.pharmacopoeia.controller;
|
|
|
+
|
|
|
+import com.pharmacopoeia.service.AdminKnowledgeService;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 药典快捷提问标签 公开查询端点(不需要 JWT 鉴权)。
|
|
|
+ * 管理端的 CRUD 在 AdminKnowledgeController 中(/api/v1/admin/knowledge/quick-asks)。
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/api/v1/yaodian")
|
|
|
+public class YaodianQuickAskController {
|
|
|
+
|
|
|
+ private final AdminKnowledgeService service;
|
|
|
+
|
|
|
+ public YaodianQuickAskController(AdminKnowledgeService service) {
|
|
|
+ this.service = service;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/quick-asks")
|
|
|
+ public ResponseEntity<List<Map<String, Object>>> listQuickAsks() {
|
|
|
+ return ResponseEntity.ok(service.listQuickAsks());
|
|
|
+ }
|
|
|
+}
|