zhongrj
2023-07-10 943e5e1fc85c696593ea3b81f7f95e235477b3c0
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
package cn.gistack.sm.message.feign;
 
import cn.gistack.sm.message.entity.MessageRecord;
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;
 
/**
 * Feign失败配置
 * @author zhongrj
 * @date 2023-07-07
 */
@FeignClient(
    value = "blade-sm",
    fallback = IMessageClientFallback.class
)
public interface IMessageClient {
 
    String API_PREFIX = "/client";
    String SAVE_MESSAGE_RECORD = API_PREFIX + "/saveMessageRecord";
    String GET_NOT_READ_NUMBER = API_PREFIX + "/getNotReadNumber";
 
    /**
     * 保存站内信记录信息
     * @param messageRecord
     * @return
     */
    @PostMapping(SAVE_MESSAGE_RECORD)
    void saveMessageRecord(@RequestBody List<MessageRecord> messageRecord);
 
 
    /**
     * 查询用户未读消息数量
     * @param phone
     * @return
     */
    @GetMapping(GET_NOT_READ_NUMBER)
    Integer getNotReadNumber(@RequestParam("phone") String phone);
}