正在显示
1 个修改的文件
包含
15 行增加
和
0 行删除
| 1 | package com.zhonglai.luhui.admin.controller.monitor; | 1 | package com.zhonglai.luhui.admin.controller.monitor; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.bean.BeanUtil; | 3 | import cn.hutool.core.bean.BeanUtil; |
| 4 | +import cn.hutool.http.HttpUtil; | ||
| 4 | import com.alibaba.fastjson.JSONObject; | 5 | import com.alibaba.fastjson.JSONObject; |
| 5 | import com.google.gson.JsonArray; | 6 | import com.google.gson.JsonArray; |
| 6 | import com.google.gson.JsonObject; | 7 | import com.google.gson.JsonObject; |
| @@ -158,6 +159,20 @@ public class ServerController extends BaseController | @@ -158,6 +159,20 @@ public class ServerController extends BaseController | ||
| 158 | } | 159 | } |
| 159 | return AjaxResult.success(); | 160 | return AjaxResult.success(); |
| 160 | } | 161 | } |
| 162 | + | ||
| 163 | + @ApiOperation("抖音文案消息转发") | ||
| 164 | + @PostMapping("/douyinWenan") | ||
| 165 | + public AjaxResult douyinWenan(@RequestBody String content ) | ||
| 166 | + { | ||
| 167 | + JSONObject jsonObject = new JSONObject(); | ||
| 168 | + jsonObject.put("msgtype","text"); | ||
| 169 | + JSONObject text = new JSONObject(); | ||
| 170 | + text.put("content",content); | ||
| 171 | + text.put("mentioned_mobile_list",new String[]{"@all"}); | ||
| 172 | + jsonObject.put("text",text); | ||
| 173 | + HttpUtil.post("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=6d6b4790-d20f-4692-bc4a-e8ceb1e8cfda",jsonObject.toJSONString()); | ||
| 174 | + return AjaxResult.success(); | ||
| 175 | + } | ||
| 161 | @ApiOperation("获取服务器应用列表") | 176 | @ApiOperation("获取服务器应用列表") |
| 162 | @GetMapping("/getServiceAoolicationList") | 177 | @GetMapping("/getServiceAoolicationList") |
| 163 | public Map<String,Object> getServiceAoolicationList() | 178 | public Map<String,Object> getServiceAoolicationList() |
-
请 注册 或 登录 后发表评论