From 52e6812c5cf6d139ae183afff976029c50adf4b4 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 06 十一月 2023 16:58:55 +0800 Subject: [PATCH] 1 --- src/main/java/com/yssh/controller/SuYuanController.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/yssh/controller/SuYuanController.java b/src/main/java/com/yssh/controller/SuYuanController.java index 1fa3d4a..0c9ebc6 100644 --- a/src/main/java/com/yssh/controller/SuYuanController.java +++ b/src/main/java/com/yssh/controller/SuYuanController.java @@ -3,6 +3,7 @@ import cn.hutool.core.date.DateTime; import com.yssh.entity.*; import com.yssh.service.CommonService; +import com.yssh.service.SocketService; import com.yssh.service.VocValsService; import com.yssh.utils.DateUtils; import com.yssh.utils.StringUtils; @@ -46,6 +47,9 @@ @Resource private VocValsService vocValsService; + + @Resource + private SocketService socketService; private final static SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHH"); @@ -214,4 +218,19 @@ return Result.OK(suYuanService.selectFastById(id, date)); } + + @ApiOperation(value = "鍙戦�佹秷鎭�") + @ApiOperationSupport(order = 19) + @GetMapping("/sendMsg") + public Result sendMsg(@RequestParam(value = "msg") String msg) { + if (StringUtils.isEmpty(msg)) return Result.error("娑堟伅涓嶈兘涓虹┖"); + + try { + String rs = socketService.sendMsg(msg); + + return Result.OK(rs); + } catch (Exception ex) { + return Result.error(ex.getMessage()); + } + } } -- Gitblit v1.9.3