package com.rongwei.bscommon.sys.fegin;

import com.rongwei.rwcommon.base.R;
import com.rongwei.rwcommonentity.commonservers.vo.SysNotifyAnnounceVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

@FeignClient(value = "rw-common-server",fallback = Hysitx.class)
public interface CommonFeginClient {
    @PostMapping("sys/sysnotifyannounce/saveOrUpdate")
    void sendNotify(@RequestBody SysNotifyAnnounceVo sysNotifyAnnounceVo);

    @PostMapping(value = "sys/sysfile/upload?platform=ic-pc&foldercode=file_system&relationid=0"
            ,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    R upload(@RequestParam("file") MultipartFile file);
}
