package com.ho.user.feignclient;

import com.ho.business.entity.Station;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.exception.DataResult;
import com.ho.user.api.vo.req.QueryDeptReqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


@FeignClient(value = ContextConstant.BUSINESS_SERVICE, fallback = BusinessFeignClientFallback.class)
public interface BusinessFeignClient {
    // 根据部门id查电站
    @PostMapping(value = ContextConstant.ROOT_CONTEXT +ContextConstant.BUSINESS + "outerApi/selectByDeptId")
    DataResult<List<Station>> selectByDeptId(@RequestBody QueryDeptReqVO queryDeptReqVO);

    // 根据部门id查电站
    @PostMapping(value = ContextConstant.ROOT_CONTEXT +ContextConstant.BUSINESS + "outerApi/selectByDeptIds")
    DataResult<List<Station>> selectByDeptIds(@RequestBody QueryDeptReqVO queryDeptReqVO);

    // 根据部门ids查电站(多个)
    @PostMapping(value = ContextConstant.ROOT_CONTEXT +ContextConstant.BUSINESS + "outerApi/selectByGroupId")
    DataResult<List<Station>> selectByGroupId(Integer groupId);

/*
    // 根据部门ids查电站(多个)
    @PostMapping(value = ContextConstant.ROOT_CONTEXT +ContextConstant.BUSINESS + "outerApi/selectByName")
    DataResult<List<Station>> selectByName(String name);

    // 根据电站id查电站(多个)
    @PostMapping(value = ContextConstant.ROOT_CONTEXT +ContextConstant.BUSINESS + "outerApi/selectByStationIds")
    DataResult<List<Station>> selectByStationIds(List<Integer> stationIds);
*/

    }
