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"; String GET_NOT_READ_LIST = API_PREFIX + "/getNotReadList"; String GET_NO_ALERT_RES_LIST = API_PREFIX + "/getNoAlertResList"; /** * 保存站内信记录信息 * @param messageRecord * @return */ @PostMapping(SAVE_MESSAGE_RECORD) void saveMessageRecord(@RequestBody List messageRecord); /** * 查询用户未读消息数量 * @param phone * @return */ @GetMapping(GET_NOT_READ_NUMBER) Integer getNotReadNumber(@RequestParam("phone") String phone); /** * 查询用户未读消息列表 * @param userId * @return */ @GetMapping(GET_NOT_READ_LIST) List getNotReadList(@RequestParam("userId")String userId); @GetMapping(GET_NO_ALERT_RES_LIST) String getNoAlertRes(@RequestParam("ruleName") String ruleName); }