package com.template.api;

import com.alibaba.fastjson.JSONObject;
import com.template.annotation.PassToken;
import com.template.model.pojo.SmartAuthorGroup;
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.*;

import java.text.ParseException;

/**
 * @Author: binguo
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/smartAuthorGroup")
@Api(tags = {"SmartAuthorGroupControllerAPI"}, value = "权限组")
public interface SmartAuthorGroupControllerAPI {
    @RequestMapping(value = "/insertSmartAuthorGroup")
    @ApiOperation(value = "添加权限组", notes = "添加权限组数据", httpMethod = "POST")
    CommonResult insertSmartAuthorGroup(@Validated @RequestBody JSONObject jsonObject, Integer samePower) throws ParseException;

    @RequestMapping(value = "/updateSmartAuthorGroup")
    @ApiOperation(value = "编辑权限组数据", notes = "编辑权限组数据", httpMethod = "POST")
    CommonResult updateSmartAuthorGroup(@Validated @RequestBody JSONObject jsonObject, Integer samePower) throws ParseException;

    @RequestMapping(value = "/addSmartAuthorGroup")
    @ApiOperation(value = "添加权限组", notes = "添加权限组数据", httpMethod = "POST")
    public CommonResult addSmartAuthorGroup(@Validated @RequestBody JSONObject jsonObject) throws ParseException;

    @RequestMapping(value = "/delSmartAuthorGroup")
    @ApiOperation(value = "删除权限组", notes = "删除权限组数据", httpMethod = "POST")
    public CommonResult delSmartAuthorGroup(Integer id);

    @RequestMapping(value = "/operateSmartAuthorGroupUser")
    @ApiOperation(value = "操作管理员", notes = "操作管理员", httpMethod = "POST")
    public CommonResult operateSmartAuthorGroupUser(Integer id, String userId) throws ParseException;

    @RequestMapping(value = "/operateSmartAuthorGroupApply")
    @ApiOperation(value = "操作管理员", notes = "操作管理员", httpMethod = "POST")
    public CommonResult operateSmartAuthorGroupApply(Integer id, String applyId);

    @RequestMapping(value = "/getSmartAuthorGroupManager")
    @ApiOperation(value = "查看管理组编辑数据", notes = "查看管理组编辑数据", httpMethod = "POST")
    public CommonResult getSmartAuthorGroupManager(String groupId);

    @RequestMapping(value = "/operateSmartAuthorDepartment")
    @ApiOperation(value = "修改权限组权限", notes = "修改权限组权限", httpMethod = "POST")
    public CommonResult operateSmartAuthorDepartment(@Validated @RequestBody JSONObject jsonObject);

    @RequestMapping(value = "/getSmartAuthorGroupMenu")
    @ApiOperation(value = "获取权限组菜单", notes = "获取权限组菜单", httpMethod = "POST")
    public CommonResult getSmartAuthorGroupMenu(Integer id);

    @RequestMapping(value = "/updateSmartAuthorGroupName")
    @ApiOperation(value = "修改权限组菜单名称", notes = "修改权限组菜单名称", httpMethod = "POST")
    public CommonResult updateSmartAuthorGroupName(@Validated @RequestBody JSONObject jsonObject);

    @RequestMapping(value = "/queryUserAuthor")
    @ApiOperation(value = "查看用户个人权限", notes = "编辑权限组数据", httpMethod = "POST")
    public CommonResult queryUserAuthor(@RequestParam String userId, @RequestHeader("user_head") String userhead);

    @RequestMapping(value = "/querySmartAuthorGroup")
    @ApiOperation(value = "权限组分页数据", notes = "权限组分页数据", httpMethod = "GET")
    CommonResult querySmartAuthorGroup(@RequestParam Integer authorGroupId);

    @RequestMapping(value = "/deleteSmartAuthorGroupById")
    @ApiOperation(value = "根据ID删除指定权限组", notes = "根据ID删除指定权限组", httpMethod = "GET")
    CommonResult deleteSmartAuthorGroupById(@RequestParam int id);

    @GetMapping(value = "/getClassById")
    @ApiOperation(value = "根据userHead获取所管理的班级", notes = "根据userHead获取所管理的班级", httpMethod = "GET")
    CommonResult getClassById(@RequestParam String userHead);

}
