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.system.EduQywxServiceProviderSchool;
import com.yida.data.system.fallback.RemoteQywxServiceFallback;
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 = "qywxServiceClient",
        fallbackFactory = RemoteQywxServiceFallback.class)
public interface RemoteQywxService {

    /**
     * 服务商对应学校加密corpId数据(原始值为key)
     *
     * @param providerCorpId     服务商corpId
     * @param deptOriginalCorpId 部门原始corpId
     * @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool>
     * @author ZYJ
     * @date 2023/9/25 17:48
     */
    @GetMapping("/in/qywx/getCorpByOriginalData")
    ResultBean<EduQywxServiceProviderSchool> getCorpByOriginalData(@RequestParam("providerCorpId") String providerCorpId,
                                                                   @RequestParam("deptOriginalCorpId") String deptOriginalCorpId);

    /**
     * 服务商对应学校加密corpId数据(加密值为key)
     *
     * @param providerCorpId       服务商corpId
     * @param deptEncryptionCorpId 部门加密corpId
     * @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool>
     * @author ZYJ
     * @date 2023/9/25 17:48
     */
    @GetMapping("/in/qywx/getCorpByEncryptionData")
    ResultBean<EduQywxServiceProviderSchool> getCorpByEncryptionData(@RequestParam("providerCorpId") String providerCorpId,
                                                                     @RequestParam("deptEncryptionCorpId") String deptEncryptionCorpId);
}
