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);
|
}
|