package com.yuchen.saas.park.api.feign.service.company;

import com.yuchen.saas.park.api.entity.park.PmgBatParkCompany;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName ParkCompanyFeignService
 * @Description 园区公司相关操作
 * @Author 张逸飞
 * @Date 22/11/16 0016 14:54
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARK,
        fallbackFactory = ParkCompanyFeignServiceFallback.class
)
public interface ParkCompanyFeignService {

    /**
     * 根据ID获取公司信息
     * @param id 公司ID
     * @return
     */
    @GetMapping("/company/getById")
    PmgBatParkCompany getById(@RequestParam Long id);

    /**
     * 根据园区ID获取该园区的所有公司信息
     * @param parkId 园区ID
     * @return
     */
    @GetMapping("/company/getByParkId")
    List<PmgBatParkCompany> getByParkId(@RequestParam Long parkId);

}
