package com.template.api;

import com.template.model.pojo.SmartClass;
import com.template.model.request.insertSmartClassRequest;
import com.template.model.request.updateClassRequest;
import com.template.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


/**
 * @Author: binguo
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/smartClass")
@Api(tags = {"SmartClassControllerAPI"}, value = "班级")
public interface SmartClassControllerAPI {
    @PostMapping(value = "/insertSmartClass")
    @ApiOperation(value = "添加班级", notes = "添加班级数据", httpMethod = "POST")
    CommonResult insertSmartClass(@Validated @RequestBody SmartClass smartApply, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartClassById")
    @ApiOperation(value = "编辑班级数据", notes = "编辑班级数据", httpMethod = "POST")
    CommonResult updateSmartClassById(@Validated @RequestBody updateClassRequest ra, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/queryPageSmartClass")
    @ApiOperation(value = "班级分页数据", notes = "班级分页数据", httpMethod = "GET")
    CommonResult queryPageSmartClasss(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartClassById")
    @ApiOperation(value = "根据ID删除指定班级", notes = "根据ID删除指定班级", httpMethod = "GET")
    CommonResult deleteSmartClassById(@RequestParam int id);

    @GetMapping(value = "/querySmartClasss")
    @ApiOperation(value = "班级集合列表数据", notes = "班级集合列表数据", httpMethod = "GET")
    CommonResult querySmartClasss(@RequestParam int gradeId);

    @PostMapping(value = "/insertSmartClassToBaisheng")
    @ApiOperation(value = "将班级数据添加到百胜系统", notes = "将班级数据添加到百胜系统", httpMethod = "POST")
    CommonResult insertSmartClassToBaisheng(@Validated @RequestBody insertSmartClassRequest iscr, BindingResult bindingResult) throws Exception;

    @PostMapping(value = "/insertTestClassToXw")
    @ApiOperation(value = "将班级数据添加到希沃", notes = "将班级数据添加到希沃", httpMethod = "POST")
    CommonResult insertTestClassToXw(@Validated @RequestBody insertSmartClassRequest iscr, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/initSchoolClasses")
    @ApiOperation(value = "初始化班级", notes = "初始化班级", httpMethod = "GET")
    CommonResult initSchoolClasses();
}
