package com.crunii.micro.feign.client;

import com.crunii.micro.common.dto.Result;
import com.crunii.micro.feign.client.dto.TestPaperVO;
import com.crunii.micro.feign.client.dto.YcqYjsCourseMgrResp;
import com.crunii.micro.feign.client.dto.YcqYjsSpecialMgr;
import com.crunii.micro.feign.client.fallbackfactory.StudyCenterServiceFallbackFactory;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.math.BigInteger;
import java.util.List;

@Service
@FeignClient(value = "service-study-center", fallbackFactory = StudyCenterServiceFallbackFactory.class)
public interface StudyCenterService {

    @ApiOperation(value = "根据专题分类查询课程信息")
    @RequestMapping(path = "/ycqYjsSpecialMgr/auth/queryCourseInfoBySpecialType", method = RequestMethod.POST)
    @ResponseBody
    Result<List<YcqYjsCourseMgrResp>> queryCourseInfoBySpecialType(@RequestBody YcqYjsSpecialMgr ycqYjsSpecialMgr);

    @ApiOperation(value = "根据id查询课程管理")
    @RequestMapping(path = "/ycqYjsCourseMgr/auth/queryById", method = RequestMethod.GET)
    @ResponseBody
    Result<YcqYjsCourseMgrResp> queryById(@RequestParam("id")BigInteger id);

    @ApiOperation(value = "根据id查询试卷信息")
    @RequestMapping(path = "/ycqYjsTestPaper/auth/getTestPaperInfo", method = RequestMethod.GET)
    @ResponseBody
    Result<TestPaperVO> getTestPaperInfo(@RequestParam("id") Long id);

}
