package org.springblade.system.client;

import java.util.List;

import org.springblade.common.openfeign.OpenFeignConstants;
import org.springblade.system.client.factory.UserClientFallbackFactory;
import org.springblade.system.client.model.MessageModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//@RequestMapping(OpenFeignConstants.SYSTEM_SERVICE + "/message")
@FeignClient(contextId = "messageClient",
        value = OpenFeignConstants.SYSTEM_SERVICE,
        fallbackFactory = UserClientFallbackFactory.class)
public interface MessageClient {

    /**
     * 保存
     */
    @PostMapping(OpenFeignConstants.SYSTEM_SERVICE + "/message/save")
    public void save(@RequestBody MessageModel messageModel);

    /**
     * 批量保存
     */
    @PostMapping(OpenFeignConstants.SYSTEM_SERVICE + "/message/saveBatch")
    public void saveBatch(@RequestBody List<MessageModel> list);
}
