package com.njcn.prepare.harmonic.api.line;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.prepare.harmonic.api.line.fallback.LimitTargetFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 自定义报表
 * @author qijian
 * @date 2022/10/20
 */
@FeignClient(
        value = ServerInfo.PREPARE_BOOT,//对应模块名
        path = "/limitTarget",//对应controller请求类
        fallbackFactory = LimitTargetFeignClientFallbackFactory.class//服务降级处理类
)
public interface LimitTargetFeignClient {

    /**
     * 批量处理报表
     * @author qijian
     * @date 2022/10/19
     */
    @PostMapping("/getLimitTargetData")
    HttpResult<String> getLimitTargetData(@RequestBody @Validated LineParam lineParam);

    @PostMapping("/limitTargetData")
    HttpResult<String> limitTargetData(@RequestBody @Validated LineParam lineParam);

}
