南昌市物联网技防平台-公安版
zengh
2021-06-04 c926acaadc3d98fd8ba8926466b842f1edb3aee3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.springblade.jfpt.webscoket.controller;
 
import org.springblade.jfpt.webscoket.service.IPushMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @author lq
 * @date 2020/4/1 11:22
 */
@RestController
public class PushMsgController {
 
    @Autowired
    private IPushMsgService pushMsgService;
 
    @PostMapping("/pushUser")
    public String pushUser(String userId,String msg){
        pushMsgService.pushMsg(userId, msg);
        return "消息发送成功:"+msg;
    }
 
    @PostMapping("/pushAll")
    public String pushAll(String msg){
        pushMsgService.pushMsg(msg);
        return "消息发送成功:"+msg;
    }
 
}