package com.neusoft.smart.pos.card.service;

import com.neusoft.smart.pos.dto.org.response.PostOrgGroupResponse;
import com.neusoft.smart.pos.framework.dto.ResponseData;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author yuan-p@neusoft.com
 * @date 2020-06-11 19:39
 * @description
 */
@FeignClient(value = "service-org")
public interface RemoteOrgService {
    @GetMapping("/orgGroup/parents")
    ResponseData<List<PostOrgGroupResponse>> getOrgGroupParents(@RequestParam(value = "entity") String entity, @RequestParam(value = "id") int id);
    @GetMapping("/orgGroup/my")
    ResponseData<PostOrgGroupResponse> getOrgGroupSelf(@RequestParam(value = "entity") String entity, @RequestParam(value = "id") int id);

    @GetMapping("/orgGroup/parentsCount")
    ResponseData<Integer> getParentsCount(@RequestParam(value = "entity") String entity, @RequestParam(value = "id") int id);

    @GetMapping("/orgGroup/isChild")
    ResponseData<Boolean> getIsChild(@RequestParam(value = "entity") String entity, @RequestParam(value = "id") int id, @RequestParam(value = "parentId") int parentId);

}
