feat(emergency): 新增移动端宣教详情接口,整理移动端API文档
- 新增 FirstAidResourceApiController,提供 GET /api/emergency/firstAid/resource/queryById - RequestPrefix 新增 FIRST_AID_RESOURCE 路径常量 - API文档-应急群聊拉人.md 合并入新文档 API文档-移动端接口.md(含群聊拉人 + 宣教资源) - API文档-急救宣教资源管理v3.md 保持管理后台接口
This commit is contained in:
+2
@@ -12,6 +12,8 @@ public interface RequestPrefix {
|
||||
|
||||
String DISEASE = BASE + "/disease";
|
||||
|
||||
String FIRST_AID_RESOURCE = BASE + "/firstAid/resource";
|
||||
|
||||
// 不鉴权路径
|
||||
String API = "/api";
|
||||
String ANON = API + "/anon/aed";
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.renkang.emergency.api.controller;
|
||||
|
||||
import com.renkang.emergency.api.RequestPrefix;
|
||||
import com.renkang.emergency.entity.FirstAidResource;
|
||||
import com.renkang.emergency.service.IFirstAidResourceService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.global.GlobalUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 移动端-急救宣教资源
|
||||
*
|
||||
* @author pengjie
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
@Tag(name = "移动端-急救宣教资源")
|
||||
@RestController
|
||||
@RequestMapping(RequestPrefix.FIRST_AID_RESOURCE)
|
||||
public class FirstAidResourceApiController {
|
||||
|
||||
@Autowired
|
||||
private IFirstAidResourceService resourceService;
|
||||
|
||||
@Operation(summary = "根据宣教ID查询详情")
|
||||
@GetMapping("/queryById")
|
||||
public Result<FirstAidResource> queryById(@RequestParam("id") String id) {
|
||||
LoginUser loginUser = GlobalUtils.getLoginUser();
|
||||
String userId = loginUser != null ? loginUser.getId() : null;
|
||||
FirstAidResource entity = resourceService.getDetail(id, userId);
|
||||
return entity == null ? Result.error("未找到对应数据") : Result.OK(entity);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user