package com.zhangmeng.api.service.admin_manager;


import com.zhangmeng.model.entity.Permission;
import com.zhangmeng.model.vo.Result;
import com.zhangmeng.model.vo.ResultTree;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Api(tags = "权限列表")
public interface PermissionControllerApi {

    @ApiOperation("权限列表")
    public Result list(Integer pageNum, Integer pageSize, String title);

    @ApiOperation("查询上级")
    public ResultTree selectParent(String parentId);

    @ApiOperation("保存权限")
    public Result save(@RequestParam @RequestBody Map<String, Object> map);

    @ApiOperation("删除权限")
    public Result delete(String permissionId);

    @ApiOperation("批量删除权限")
    public Result batchRemove(String ids);

    @ApiOperation("根据userId查询权限")
    List<Permission> findByUserId(Long id);
}
