org.jeecg.common.aspect.annotation.PermissionData Java Examples

The following examples show how to use org.jeecg.common.aspect.annotation.PermissionData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JeecgDemoController.java    From jeecg-cloud with Apache License 2.0 6 votes vote down vote up
/**
 * 分页列表查询
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@ApiOperation(value = "获取Demo数据列表", notes = "获取所有Demo数据列表")
@GetMapping(value = "/list")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                      HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = QueryGenerator.initQueryWrapper(jeecgDemo, req.getParameterMap());
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);

    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    log.info("查询当前页:" + pageList.getCurrent());
    log.info("查询当前页数量:" + pageList.getSize());
    log.info("查询结果数量:" + pageList.getRecords().size());
    log.info("数据总数:" + pageList.getTotal());
    return Result.ok(pageList);
}
 
Example #2
Source File: JeecgDemoController.java    From jeecg-boot with Apache License 2.0 6 votes vote down vote up
/**
 * 分页列表查询
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@ApiOperation(value = "获取Demo数据列表", notes = "获取所有Demo数据列表")
@GetMapping(value = "/list")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                      HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = QueryGenerator.initQueryWrapper(jeecgDemo, req.getParameterMap());
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);

    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    log.info("查询当前页:" + pageList.getCurrent());
    log.info("查询当前页数量:" + pageList.getSize());
    log.info("查询结果数量:" + pageList.getRecords().size());
    log.info("数据总数:" + pageList.getTotal());
    return Result.ok(pageList);
}
 
Example #3
Source File: JeecgDemoController.java    From jeecg-boot-with-activiti with MIT License 6 votes vote down vote up
/**
 * 分页列表查询
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@ApiOperation(value = "获取Demo数据列表", notes = "获取所有Demo数据列表")
@GetMapping(value = "/list")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                      HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = QueryGenerator.initQueryWrapper(jeecgDemo, req.getParameterMap());
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);

    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    log.info("查询当前页:" + pageList.getCurrent());
    log.info("查询当前页数量:" + pageList.getSize());
    log.info("查询结果数量:" + pageList.getRecords().size());
    log.info("数据总数:" + pageList.getTotal());
    return Result.ok(pageList);
}
 
Example #4
Source File: TeachingWorkController.java    From teaching with Apache License 2.0 6 votes vote down vote up
/**
	 * 分页列表查询
	 *
	 * @param studentWorkModel
	 * @param pageNo
	 * @param pageSize
	 * @param req
	 * @return
	 */
	@AutoLog(value = "作业列表-分页列表查询")
	@ApiOperation(value="作业列表-分页列表查询", notes="作业列表-分页列表查询")
	@GetMapping(value = "/list")
	@PermissionData(pageComponent = "teaching/TeachingWorkList")
	public Result<?> queryPageList(StudentWorkModel studentWorkModel,
								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
								   HttpServletRequest req) {
//		QueryWrapper<TeachingWork> queryWrapper = QueryGenerator.initQueryWrapper(teachingWork, req.getParameterMap());
		Page<TeachingWork> page = new Page<TeachingWork>(pageNo, pageSize);
		QueryWrapper<StudentWorkModel> queryWrapper = new QueryWrapper<>();
		queryWrapper.eq(null != studentWorkModel.getUsername(), "teaching_work.create_by", studentWorkModel.getUsername())
				.like(null != studentWorkModel.getWorkName(), "work_name", studentWorkModel.getWorkName())
				.like(null != studentWorkModel.getRealname(), "realname", studentWorkModel.getRealname());
		QueryGenerator.installMplus(queryWrapper, studentWorkModel, req.getParameterMap());
		//获取时间参数
		Map<String, String[]> param = req.getParameterMap();
		String updateTime_begin =  param.containsKey("teaching_work.updateTime_begin")?param.get("teaching_work.updateTime_begin")[0]:null;
		String updateTime_end = param.containsKey("teaching_work.updateTime_end")?param.get("teaching_work.updateTime_end")[0]:null;
		queryWrapper.ge(null != updateTime_begin, "teaching_work.create_time", updateTime_begin).
				le(null != updateTime_end, "teaching_work.create_time",updateTime_end);
		IPage<StudentWorkModel> pageList = teachingWorkService.listWorkModel(new Page<>(pageNo, pageSize), queryWrapper);
		return Result.ok(pageList);
	}
 
Example #5
Source File: JeecgDemoController.java    From teaching with Apache License 2.0 6 votes vote down vote up
/**
 * 分页列表查询
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@ApiOperation(value = "获取Demo数据列表", notes = "获取所有Demo数据列表")
@GetMapping(value = "/list")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                      HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = QueryGenerator.initQueryWrapper(jeecgDemo, req.getParameterMap());
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);

    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    log.info("查询当前页:" + pageList.getCurrent());
    log.info("查询当前页数量:" + pageList.getSize());
    log.info("查询结果数量:" + pageList.getRecords().size());
    log.info("数据总数:" + pageList.getTotal());
    return Result.ok(pageList);
}
 
Example #6
Source File: SysUserController.java    From jeecg-boot with Apache License 2.0 5 votes vote down vote up
/**
    * 获取用户列表数据
    * @param user
    * @param pageNo
    * @param pageSize
    * @param req
    * @return
    */
   @PermissionData(pageComponent = "system/UserList")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public Result<IPage<SysUser>> queryPageList(SysUser user,@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,HttpServletRequest req) {
	Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
	QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
   	//TODO 外部模拟登陆临时账号,列表不显示
       queryWrapper.ne("username","_reserve_user_external");
	Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
	IPage<SysUser> pageList = sysUserService.page(page, queryWrapper);

	//批量查询用户的所属部门
       //step.1 先拿到全部的 useids
       //step.2 通过 useids,一次性查询用户的所属部门名字
       List<String> userIds = pageList.getRecords().stream().map(SysUser::getId).collect(Collectors.toList());
       if(userIds!=null && userIds.size()>0){
           Map<String,String>  useDepNames = sysUserService.getDepNamesByUserIds(userIds);
           pageList.getRecords().forEach(item->{
               //TODO 临时借用这个字段用于页面展示
               item.setOrgCode(useDepNames.get(item.getId()));
           });
       }
	result.setSuccess(true);
	result.setResult(pageList);
	log.info(pageList.toString());
	return result;
}
 
Example #7
Source File: PermissionDataAspect.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
@Around("pointCut()")
public Object arround(ProceedingJoinPoint point) throws  Throwable{
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	MethodSignature signature = (MethodSignature) point.getSignature();
	Method method = signature.getMethod();
	PermissionData pd = method.getAnnotation(PermissionData.class);
	String component = pd.pageComponent();
	authDataHandler(request, component);
	return  point.proceed();
}
 
Example #8
Source File: JeecgDemoController.java    From jeecg-boot with Apache License 2.0 5 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatisPlus java类方式加载权限
 *
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/mpList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadMpPermissonList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                     HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
    //编程方式,给queryWrapper装载数据权限规则
    QueryGenerator.installAuthMplus(queryWrapper, JeecgDemo.class);
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);
    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    return Result.ok(pageList);
}
 
Example #9
Source File: TeachingCourseUnitController.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
 * 分页列表查询
 *
 * @param teachingCourseUnit
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@AutoLog(value = "课程单元-分页列表查询")
@ApiOperation(value="课程单元-分页列表查询", notes="课程单元-分页列表查询")
@GetMapping(value = "/list")
@PermissionData
public Result<?> queryPageList(CourseUnitModel teachingCourseUnit,
							   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
							   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
							   HttpServletRequest req) {
	QueryWrapper<CourseUnitModel> queryWrapper = QueryGenerator.initQueryWrapper(teachingCourseUnit, req.getParameterMap());
	Page<CourseUnitModel> page = new Page<CourseUnitModel>(pageNo, pageSize);
	IPage<CourseUnitModel> pageList = teachingCourseUnitService.getCourseUnitList(page, queryWrapper);
	return Result.ok(pageList);
}
 
Example #10
Source File: TeachingCourseController.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
 * 分页列表查询
 *
 * @param teachingCourse
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@AutoLog(value = "课程-分页列表查询")
@ApiOperation(value="课程-分页列表查询", notes="课程-分页列表查询")
@GetMapping(value = "/list")
@PermissionData
public Result<?> queryPageList(TeachingCourse teachingCourse,
							   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
							   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
							   HttpServletRequest req) {
	QueryWrapper<TeachingCourse> queryWrapper = QueryGenerator.initQueryWrapper(teachingCourse, req.getParameterMap());
	Page<TeachingCourse> page = new Page<TeachingCourse>(pageNo, pageSize);
	IPage<TeachingCourse> pageList = teachingCourseService.page(page, queryWrapper);
	return Result.ok(pageList);
}
 
Example #11
Source File: JeecgDemoController.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatisPlus java类方式加载权限
 *
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/mpList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadMpPermissonList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                     HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
    //编程方式,给queryWrapper装载数据权限规则
    QueryGenerator.installAuthMplus(queryWrapper, JeecgDemo.class);
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);
    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    return Result.ok(pageList);
}
 
Example #12
Source File: JeecgDemoController.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatisPlus java类方式加载权限
 *
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/mpList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadMpPermissonList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                     HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
    //编程方式,给queryWrapper装载数据权限规则
    QueryGenerator.installAuthMplus(queryWrapper, JeecgDemo.class);
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);
    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    return Result.ok(pageList);
}
 
Example #13
Source File: SysUserController.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
/**
    * 获取用户列表数据
    * @param user
    * @param pageNo
    * @param pageSize
    * @param req
    * @return
    */
   @PermissionData(pageComponent = "system/UserList")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public Result<IPage<SysUser>> queryPageList(SysUser user,@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,HttpServletRequest req) {
	Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
	QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
   	//TODO 外部模拟登陆临时账号,列表不显示
       queryWrapper.ne("username","_reserve_user_external");
	Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
	IPage<SysUser> pageList = sysUserService.page(page, queryWrapper);

	//批量查询用户的所属部门
       //step.1 先拿到全部的 useids
       //step.2 通过 useids,一次性查询用户的所属部门名字
       List<String> userIds = pageList.getRecords().stream().map(SysUser::getId).collect(Collectors.toList());
       if(userIds!=null && userIds.size()>0){
           Map<String,String>  useDepNames = sysUserService.getDepNamesByUserIds(userIds);
           pageList.getRecords().forEach(item->{
               //TODO 临时借用这个字段用于页面展示
               item.setOrgCode(useDepNames.get(item.getId()));
           });
       }
	result.setSuccess(true);
	result.setResult(pageList);
	log.info(pageList.toString());
	return result;
}
 
Example #14
Source File: JeecgDemoController.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatisPlus java类方式加载权限
 *
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/mpList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadMpPermissonList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                     HttpServletRequest req) {
    QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
    //编程方式,给queryWrapper装载数据权限规则
    QueryGenerator.installAuthMplus(queryWrapper, JeecgDemo.class);
    Page<JeecgDemo> page = new Page<JeecgDemo>(pageNo, pageSize);
    IPage<JeecgDemo> pageList = jeecgDemoService.page(page, queryWrapper);
    return Result.ok(pageList);
}
 
Example #15
Source File: JeecgDemoController.java    From teaching with Apache License 2.0 4 votes vote down vote up
/**
 * 导出excel
 *
 * @param request
 */
@RequestMapping(value = "/exportXls")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public ModelAndView exportXls(HttpServletRequest request, JeecgDemo jeecgDemo) {
    return super.exportXls(request, jeecgDemo, JeecgDemo.class, "单表模型");
}
 
Example #16
Source File: JeecgDemoController.java    From jeecg-boot-with-activiti with MIT License 4 votes vote down vote up
/**
 * 导出excel
 *
 * @param request
 */
@RequestMapping(value = "/exportXls")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public ModelAndView exportXls(HttpServletRequest request, JeecgDemo jeecgDemo) {
    return super.exportXls(request, jeecgDemo, JeecgDemo.class, "单表模型");
}
 
Example #17
Source File: SysUserController.java    From teaching with Apache License 2.0 4 votes vote down vote up
@PermissionData(pageComponent = "system/UserList")
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	public Result<IPage<SysUserModel>> queryPageList(SysUserModel user, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
                                                @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
		Result<IPage<SysUserModel>> result = new Result<IPage<SysUserModel>>();
//		QueryWrapper<SysUserModel> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
        Map<String, String[]> param = req.getParameterMap();
        String[] areaRaw = param.get("area");
        String provinceId = null;
        String cityId = null;
        if (areaRaw != null && areaRaw.length == 1){
            JSONObject area = JSONObject.parseObject(areaRaw[0]);
            provinceId = area.getString("provinceId");
            cityId = area.getString("cityId");
        }
        String roleId = param.containsKey("roleId")?param.get("roleId")[0]:null;
        String departName = param.containsKey("departName")?param.get("departName")[0]:null;
        QueryWrapper<SysUserModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(org.apache.commons.lang3.StringUtils.isNotEmpty(provinceId), "sys_user.province", provinceId);
        queryWrapper.eq(org.apache.commons.lang3.StringUtils.isNotEmpty(cityId),"sys_user.city", cityId);
        queryWrapper.eq(org.apache.commons.lang3.StringUtils.isNotEmpty(roleId), "role_id", roleId);
        queryWrapper.eq(org.apache.commons.lang3.StringUtils.isNotEmpty(departName), "sys_depart.depart_name", departName);

        QueryGenerator.installMplus(queryWrapper, user, req.getParameterMap());

		Page<SysUserModel> page = new Page<SysUserModel>(pageNo, pageSize);
        IPage<SysUserModel> pageList = sysUserService.getUserList(page, queryWrapper);

//		IPage<SysUserModel> pageList = sysUserService.page(page, queryWrapper);

		//批量查询用户的所属部门
        //step.1 先拿到全部的 useids
        //step.2 通过 useids,一次性查询用户的所属部门名字
//        List<String> userIds = pageList.getRecords().stream().map(SysUser::getId).collect(Collectors.toList());
//        if(userIds!=null && userIds.size()>0){
//            Map<String,String>  useDepNames = sysUserService.getDepNamesByUserIds(userIds);
//            pageList.getRecords().forEach(item->{
//                //TODO 临时借用这个字段用于页面展示
//                item.setOrgCode(useDepNames.get(item.getId()));
//            });
//        }
		result.setSuccess(true);
		result.setResult(pageList);
		log.info(pageList.toString());
		return result;
	}
 
Example #18
Source File: JeecgDemoController.java    From jeecg-boot with Apache License 2.0 4 votes vote down vote up
/**
 * 导出excel
 *
 * @param request
 */
@RequestMapping(value = "/exportXls")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public ModelAndView exportXls(HttpServletRequest request, JeecgDemo jeecgDemo) {
    return super.exportXls(request, jeecgDemo, JeecgDemo.class, "单表模型");
}
 
Example #19
Source File: JeecgDemoController.java    From jeecg-cloud with Apache License 2.0 4 votes vote down vote up
/**
 * 导出excel
 *
 * @param request
 */
@RequestMapping(value = "/exportXls")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public ModelAndView exportXls(HttpServletRequest request, JeecgDemo jeecgDemo) {
    return super.exportXls(request, jeecgDemo, JeecgDemo.class, "单表模型");
}
 
Example #20
Source File: JeecgDemoController.java    From jeecg-boot-with-activiti with MIT License 3 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatis xml方式加载权限
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/sqlList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadSqlPermissonList(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                      HttpServletRequest req) {
    IPage<JeecgDemo> pageList = jeecgDemoService.queryListWithPermission(pageSize, pageNo);
    return Result.ok(pageList);
}
 
Example #21
Source File: JeecgDemoController.java    From teaching with Apache License 2.0 3 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatis xml方式加载权限
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/sqlList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadSqlPermissonList(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                      HttpServletRequest req) {
    IPage<JeecgDemo> pageList = jeecgDemoService.queryListWithPermission(pageSize, pageNo);
    return Result.ok(pageList);
}
 
Example #22
Source File: JeecgDemoController.java    From jeecg-cloud with Apache License 2.0 3 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatis xml方式加载权限
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/sqlList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadSqlPermissonList(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                      HttpServletRequest req) {
    IPage<JeecgDemo> pageList = jeecgDemoService.queryListWithPermission(pageSize, pageNo);
    return Result.ok(pageList);
}
 
Example #23
Source File: JeecgDemoController.java    From jeecg-boot with Apache License 2.0 3 votes vote down vote up
/**
 * 【数据权限示例 - 编程】mybatis xml方式加载权限
 *
 * @param jeecgDemo
 * @param pageNo
 * @param pageSize
 * @param req
 * @return
 */
@GetMapping(value = "/sqlList")
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
public Result<?> loadSqlPermissonList(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                      HttpServletRequest req) {
    IPage<JeecgDemo> pageList = jeecgDemoService.queryListWithPermission(pageSize, pageNo);
    return Result.ok(pageList);
}