package com.template.api;


import com.template.model.request.insertSectionRequest;
import com.template.model.request.updateSectionRequest;
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.*;

@RequestMapping("/api/smartSection")
@Api(tags = {"SmartSectionControllerAPI"}, value = "分段接口")
public interface SmartSectionControllerAPI {
    @PostMapping(value = "/insertSection")
    @ApiOperation(value = "添加分段数据", notes = "添加分段数据", httpMethod = "POST")
    CommonResult insertSection(@Validated @RequestBody insertSectionRequest isr, BindingResult bindingResult);

    @PostMapping(value = "/updateSection")
    @ApiOperation(value = "编辑分段数据", notes = "编辑分段数据", httpMethod = "POST")
    CommonResult updateSection(@Validated @RequestBody updateSectionRequest isr, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartUser")
    @ApiOperation(value = "用户分页数据", notes = "用户分页数据", httpMethod = "GET")
    CommonResult queryPageSmartSection(@RequestParam int currentPage, @RequestParam int pageCount);

    @GetMapping(value = "/deleteSmartSection")
    @ApiOperation(value = "删除分段数据", notes = "删除分段数据", httpMethod = "GET")
    CommonResult deleteSmartSection(@RequestParam int id);
}
