package com.template.api;

import com.template.model.pojo.SystemMenu;
import com.template.model.result.CommonResult;
import com.template.model.vo.SystemMenuTreeVo;
import com.template.model.vo.SystemMenuVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Author: xwt
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/systemMenu")
@Api(tags = {"SystemMenuController"}, value = "测试接口")
public interface SystemMenuControllerAPI {
    @GetMapping(value = "/QueryPlaybackRecordBySql")
    @ApiOperation(value = "通过sql获取数据", notes = "通过sql获取数据", httpMethod = "GET")
    CommonResult<List<SystemMenuVo>> QueryPlaybackRecordBySql();

    @GetMapping(value = "/QuerySystemMenus")
    @ApiOperation(value = "查询所有菜单数据", notes = "查询所有菜单数据", httpMethod = "GET")
    CommonResult<List<SystemMenu>> QueryPlaybackRecords();

    @PostMapping(value = "/InsertSystemMenu")
    @ApiOperation(value = "新增菜单数据", notes = "新增菜单数据", httpMethod = "POST")
    CommonResult InsertSystemMenu(@RequestBody SystemMenu systemMenu);

    @PostMapping(value = "/DeleteSystemMenu")
    @ApiOperation(value = "新增菜单数据", notes = "新增菜单数据", httpMethod = "POST")
    CommonResult DeleteSystemMenu(@RequestParam("userId") Integer userID);

    @GetMapping(value = "/QueryMenuTrees")
    @ApiOperation(value = "查询树形菜单数据", notes = "查询树形菜单数据", httpMethod = "GET")
    CommonResult<List<SystemMenuTreeVo>> QueryMenuTreeRecords();

    @PostMapping(value = "/InsertPlaybackRecord")
    @ApiOperation(value = "新增", notes = "新增", httpMethod = "POST")
    CommonResult<Integer> InsertPlaybackRecord(@RequestBody SystemMenu pb);

    @GetMapping("/testQuery")
    @ApiOperation(value = "查询", notes = "查询", httpMethod = "GET")
    CommonResult<List<SystemMenu>> QueryPlaybackRecords(HttpServletRequest request);
}
