package com.yida.data.system.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.common.core.entity.school.EduYidaAppAccount;

import com.yida.data.system.fallback.RemoteYidaAppAccountServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "appAccountServiceClient",
        fallbackFactory = RemoteYidaAppAccountServiceFallback.class)
public interface RemoteYidaAppAccountService {

    @GetMapping("/yida/account/getAccountByAccountId")
    ResultBean<EduYidaAppAccount> getAccountByAccountId(@RequestParam("accountId") String accountId);

    @GetMapping("/yida/account/getAccountByType")
    ResultBean<EduYidaAppAccount> getAccountByType(@RequestParam("schoolId") Long schoolId, @RequestParam(
            "type") Integer type);


    @GetMapping("/in/yida/account/getAccountByType")
    ResultBean<EduYidaAppAccount> getAccountByTypeNoPermission(@RequestParam("schoolId") Long schoolId,
                                                               @RequestParam(
                                                                       "type") Integer type);
}
