package com.sptg.permissions.api.feigns;

import com.sptg.permissions.api.entity.ImportExcelError;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author WFT
 * @date 2020/5/29
 * description:
 */
@FeignClient(value = "smart-house-permissions")
public interface ImportExcelErrorFeign {

    /**
     * 添加导入表格异常日志
     * @param excelError 异常信息
     */
    @PostMapping(value = "/import/excel/error/add")
    void add(@RequestBody ImportExcelError excelError);

    @GetMapping(value = "/import/excel/error/list/{flag}")
    List<ImportExcelError> getListByFlag(@PathVariable(value = "flag") String flag);

    @PostMapping(value = "/import/excel/error/deleteByIds")
    void delete(@RequestBody List<Long> idList);
}
