| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresRoles; |
| | | import org.jeecg.common.api.vo.Result; |
| | |
| | | LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>(); |
| | | query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0); |
| | | query.orderByAsc(SysPermission::getSortNo); |
| | | |
| | | |
| | | //支持通过菜单名字,模糊查询 |
| | | if(oConvertUtils.isNotEmpty(sysPermission.getName())){ |
| | | query.like(SysPermission::getName, sysPermission.getName()); |
| | |
| | | |
| | | // /** |
| | | // * 查询用户拥有的菜单权限和按钮权限(根据用户账号) |
| | | // * |
| | | // * |
| | | // * @return |
| | | // */ |
| | | // @RequestMapping(value = "/queryByUser", method = RequestMethod.GET) |
| | |
| | | } |
| | | //update-end---author:liusq ---date:2022-06-29 for:设置自定义首页地址和组件----------- |
| | | } |
| | | |
| | | |
| | | JSONObject json = new JSONObject(); |
| | | JSONArray menujsonArray = new JSONArray(); |
| | | this.getPermissionJsonArray(menujsonArray, metaList, null); |
| | |
| | | json.put("sysSafeMode", jeecgBaseConfig.getSafeMode()); |
| | | result.setResult(json); |
| | | } catch (Exception e) { |
| | | result.error500("查询失败:" + e.getMessage()); |
| | | result.error500("查询失败:" + e.getMessage()); |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | return result; |
| | |
| | | } |
| | | return result; |
| | | } |
| | | @PostMapping("/addSecret") |
| | | public Result<?> secret(@RequestBody Secret secret){ |
| | | return Result.OK(sysPermissionService.addSecret(secret.getType(),secret.getSql())); |
| | | } |
| | | |
| | | } |