Commit 95b8c64a authored by zhouwei's avatar zhouwei

新增紧急通知处理接口

parent 8aa47906
package com.nanyan.securitylink.controller;
import com.alibaba.fastjson.JSONObject;
import com.nanyan.securitylink.dto.AIRequestDTO;
import com.nanyan.securitylink.service.AIService;
import com.nanyan.securitylink.vo.AIResponse;
import com.nanyan.securitylink.vo.CodeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -14,20 +16,25 @@ public class AIController {
@Autowired
AIService aiService;
@PostMapping("/translate")
public Response<AIResponse> translate(@RequestBody AIRequestDTO AIRequestDTO) {
public Response<AIResponse<String>> translate(@RequestBody AIRequestDTO AIRequestDTO) {
return Response.SUCCESS(aiService.translate(AIRequestDTO));
}
@PostMapping("/news/tag")
public Response<AIResponse> newsTag(@RequestBody AIRequestDTO AIRequestDTO) {
public Response<AIResponse<CodeVO>> newsTag(@RequestBody AIRequestDTO AIRequestDTO) {
return Response.SUCCESS(aiService.newsTags(AIRequestDTO));
}
@PostMapping("/natural/disaster/tag")
public Response<AIResponse> naturalDisasterTag(@RequestBody AIRequestDTO AIRequestDTO) {
public Response<AIResponse<CodeVO>> naturalDisasterTag(@RequestBody AIRequestDTO AIRequestDTO) {
return Response.SUCCESS(aiService.naturalDisasterTag(AIRequestDTO));
}
@PostMapping("/news/tag/translate")
public Response<AIResponse> newsTagAndTranslate(@RequestBody AIRequestDTO AIRequestDTO) {
public Response<AIResponse<JSONObject>> newsTagAndTranslate(@RequestBody AIRequestDTO AIRequestDTO) {
return Response.SUCCESS(aiService.newsTagAndTranslate(AIRequestDTO));
}
@PostMapping("/urgent/notice")
public Response<AIResponse<JSONObject>> dealUrgentNotice(@RequestBody AIRequestDTO AIRequestDTO) {
return Response.SUCCESS(aiService.dealUrgentNotice(AIRequestDTO));
}
}
......@@ -12,4 +12,6 @@ public interface AIService {
AIResponse<CodeVO> naturalDisasterTag(AIRequestDTO aiRequestDTO);
AIResponse<JSONObject> newsTagAndTranslate(AIRequestDTO aiRequestDTO);
AIResponse<JSONObject> dealUrgentNotice(AIRequestDTO aiRequestDTO);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment