| | |
| | | @RequestMapping("pushMsg") |
| | | public class PushMsgController { |
| | | |
| | | @Autowired |
| | | private IPushMsgService pushMsgService; |
| | | @Autowired |
| | | private IPushMsgService pushMsgService; |
| | | |
| | | @PostMapping("/pushUser") |
| | | public String pushUser(String userId,String msg){ |
| | | pushMsgService.pushMsg(userId, msg); |
| | | return "消息发送成功:"+msg; |
| | | } |
| | | @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; |
| | | } |
| | | @PostMapping("/pushAll") |
| | | public String pushAll(String msg) { |
| | | pushMsgService.pushMsg(msg); |
| | | return "消息发送成功:" + msg; |
| | | } |
| | | |
| | | @GetMapping("/inviteVideoCall") |
| | | public R<Map> inviteVideoCall(String userId,String type){ |
| | | //获取当前时间戳作为房间号 |
| | | @GetMapping("/inviteVideoCall") |
| | | public R<Map> inviteVideoCall(String userId, String type, String name,String faqiid) { |
| | | //获取当前时间戳作为房间号 |
| | | String roomId = ""; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | String time = String.valueOf(new Date().getTime()); |
| | | int msg = pushMsgService.inviteVideoCall(userId,time,type); |
| | | map.put("type",type); |
| | | map.put("roomId",time); |
| | | map.put("res",0); |
| | | int msg = pushMsgService.inviteVideoCall(userId, time, type, name,faqiid); |
| | | map.put("type", type); |
| | | map.put("roomId", time); |
| | | map.put("res", msg); |
| | | |
| | | return R.data(map); |
| | | } |
| | | |
| | | @GetMapping("/closeVideoCall") |
| | | public void closeVideoCall(String sentId, String acceptId) { |
| | | |
| | | pushMsgService.closeVideoCall(sentId, acceptId); |
| | | |
| | | } |
| | | |
| | | } |