package com.ym.mec.web;

import com.ym.mec.common.config.FeignConfiguration;
import com.ym.mec.common.entity.HttpResponseResult;
import com.ym.mec.common.page.QueryInfo;
import com.ym.mec.web.fallback.WebFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "web-server", contextId = "WebFeignService", configuration = FeignConfiguration.class, fallback = WebFeignServiceFallback.class)
public interface WebFeignService {

	@RequestMapping(value = "api/createCashAccount")
	Boolean createCashAccount(@RequestParam("userId") Integer userId,@RequestParam("tenantId") Integer tenantId);

	@RequestMapping(value = "api/queryTeacherOrganId")
	Integer queryTeacherOrganId(@RequestParam("userId") Integer userId);

	@RequestMapping(value = "api/isPurchasedPracticeCourse")
	Boolean isPurchasedPracticeCourse(@RequestParam("userId") Integer userId);

	@RequestMapping(value = "api/updateNickName")
	int updateNickName(@RequestParam("userId") Integer userId, @RequestParam("nickName") String nickName);

	@RequestMapping(value = "api/queryOrganIdByUserId")
	String queryOrganIdByUserId(@RequestParam("userId") Integer userId, @RequestParam("clientId") String clientId);

	@RequestMapping(value = "api/getTenantConfigValue")
	String getTenantConfigValue(@RequestParam("tenantId") Integer tenantId, @RequestParam("paramName") String paramName);

	@PostMapping(value = "api/queryVipPracticeGroups")
    Boolean queryVipPracticeGroups();
}
