package com.template.api;

import com.template.model.pojo.SmartMenu;
import com.template.model.request.insertMenuRequest;
import com.template.model.request.updateMenuRequest;
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/smartMenu")
@Api(tags = {"SmartMenuControllerAPI"}, value = "菜单")
public interface SmartMenuControllerAPI {
    @PostMapping(value = "/insertSmartMenu")
    @ApiOperation(value = "添加菜单", notes = "添加菜单数据", httpMethod = "POST")
    CommonResult insertSmartMenu(@Validated @RequestBody insertMenuRequest imr, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartMenuById")
    @ApiOperation(value = "编辑菜单数据", notes = "编辑菜单数据", httpMethod = "POST")
    CommonResult updateSmartMenuById(@Validated @RequestBody updateMenuRequest ra, BindingResult bindingResult) throws Exception;

    @GetMapping(value = "/queryPageSmartMenu")
    @ApiOperation(value = "菜单分页数据", notes = "菜单分页数据", httpMethod = "GET")
    CommonResult queryPageSmartMenus(@RequestParam int currentPage, @RequestParam int pageCount, String name);

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


}
