package com.vctgo.system.api;

import com.vctgo.common.core.constant.ServiceNameConstants;
import com.vctgo.common.core.domain.R;
import com.vctgo.common.core.web.domain.AjaxResult;
import com.vctgo.system.api.domain.FileInfo;
import com.vctgo.system.api.domain.MessageInfo;
import com.vctgo.system.api.factory.RemoteFileFallbackFactory;
import com.vctgo.system.api.factory.RemoteMessageFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 消息服务
 *
 * @author vctgo
 */
@FeignClient(contextId = "remoteMessageService", value = ServiceNameConstants.MESSAGE_SERVICE, fallbackFactory = RemoteMessageFallbackFactory.class)
public interface RemoteMessageService {

    /**
     * 临时忽略消息表，通过非租户内部来给租户推送消息
     */
    @PostMapping("/message/add/tenant")
    R addByTenantId(@RequestBody MessageInfo messageInfo);

    /**
     * 临时忽略消息表，批量通过非租户内部来给租户推送消息
     */
    @PostMapping("/message/batch/add/tenant")
    R batchAddByTenantId(@RequestParam("messageInfo") String messageInfo);
}
