class SysRoleController extends AbstractController {

    private final SysRoleService sysRoleService;

    /**
     * 角色列表
     */
    @AutoFullData
    @GetMapping(value = "/list")
    public R list(@RequestParam Map<String, Object> params) {<FILL_FUNCTION_BODY>}

    /**
     * 角色列表
     */
    @GetMapping(value = "/select")
    public R select() {
        final List<SysRole> list = sysRoleService.list();
        return R.ok().setData(list);
    }


    /**
     * 保存角色
     */
    @SysLog("保存角色")
    @PostMapping(value = "/save")
    public R save(@RequestBody SysRole role) {
        role.setCreateUserId(getUserId());
        sysRoleService.saveRoleMenu(role);
        return R.ok();
    }

    /**
     * 修改角色
     */
    @SysLog("修改角色")
    @PostMapping(value = "/update")
    public R update(@RequestBody SysRole role) {
        role.setCreateUserId(getUserId());
        sysRoleService.updateRoleMenu(role);

        return R.ok();
    }

    /**
     * 删除角色
     */
    @SysLog("删除角色")
    @PostMapping(value = "/delete")
    public R delete(@RequestBody SysRole role) {
        if (role == null || role.getRoleId() == null) {
            return R.error("ID为空");
        }
        sysRoleService.deleteBath(role.getRoleId());
        return R.ok();
    }
}

        QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
        //如果不是超级管理员，则只查询自己创建的角色列表
        if (!getUserId().equals(Constant.SUPER_ADMIN)) {
            queryWrapper.lambda().eq(SysRole::getCreateUserId, getUserId());
        }

        //查询列表数据
        final String keyword = mpPageConvert.getKeyword(params);
        if (StrUtil.isNotEmpty(keyword)) {
            queryWrapper
                    .lambda()
                    .and(func -> func.like(SysRole::getRoleName, keyword));
        }
        IPage<SysRole> listPage = sysRoleService.page(mpPageConvert.<SysRole>pageParamConvert(params), queryWrapper);
        return R.ok().setData(listPage);
    
<methods>public non-sealed void <init>() <variables>protected com.suke.czx.common.utils.MPPageConvert mpPageConvert,public com.fasterxml.jackson.databind.ObjectMapper objectMapper