刘光辉
10 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package jnpf.message;
 
import jnpf.base.UserInfo;
import jnpf.message.fallback.SentMessageApiFallback;
import jnpf.message.model.SentMessageForm;
import jnpf.utils.FeignName;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.util.List;
 
/**
 * 调用系统消息Api
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com)
 * @date 2021-03-24
 */
@FeignClient(name = FeignName.MESSAGE_SERVER_NAME, fallback = SentMessageApiFallback.class, path = "/MessageAll")
public interface SentMessageApi {
 
    /**
     * 发送消息
     *
     * @param sentMessageForm
     * @return
     */
    @PostMapping
    void sendMessage(@RequestBody SentMessageForm sentMessageForm);
 
    /**
     * 发送消息
     *
     * @param toUserIds 发送用户
     * @param title     标题
     * @param bodyText  内容
     */
    @PostMapping("/sentMessage")
    void sentMessage(@RequestParam("toUserIds") List<String> toUserIds, @RequestParam("title") String title, @RequestParam("bodyText") String bodyText, @RequestParam("source") Integer source, @RequestParam("type") Integer type, @RequestBody UserInfo userInfo);
 
    @GetMapping("/logoutWS")
    void logoutWebsocketByToken(@RequestParam(name = "token", required = false) String token, @RequestParam(name = "userId", required = false) String userId);
 
    @PostMapping("/sendScheduleMessage")
    List<String> sendScheduleMessage(@RequestBody SentMessageForm sentMessageForm);
}