Java Code Examples for com.github.pagehelper.Page#forEach()

The following examples show how to use com.github.pagehelper.Page#forEach() . 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: SysUserConsumerServiceImpl.java    From phone with Apache License 2.0 5 votes vote down vote up
/**
 * 分页查询
 * 
 * @param queryInfo
 * @param pageNum
 * @param pageSize
 * @param orderBy
 * @return
 */ 
@Override
@Logger(model = LogEnum.SysUser, type = LogOperateEnum.Select, title = "")
public Json findByPage(SysUser queryInfo, int pageNum, int pageSize,String orderBy) {
	Json json = new Json();
	Page<SysUser> result = service.findByPage(queryInfo,pageNum,pageSize,orderBy);
	if (result == null) {
		return ErrorConfig.getSystemErrorJson();
	}
	result.forEach((su)->{
		su.setPassword(null);
	});
	json.setSuccess(true).setObj(result).setTotal(result.getPages());
	return json;
}
 
Example 2
Source File: SysUserConsumerServiceImpl.java    From phone with Apache License 2.0 5 votes vote down vote up
/**
 * 查询所有
 * 
 * @param queryInfo
 * @param orderBy
 * @return
 */ 
@Override
@Logger(model = LogEnum.SysUser, type = LogOperateEnum.Select, title = "")
public Json findAll(SysUser queryInfo, String orderBy) {
	Json json = new Json();
	Page<SysUser> result = service.findAll(queryInfo,orderBy);
	if (result == null) {
		return ErrorConfig.getSystemErrorJson();
	}
	result.forEach((su)->{
		su.setPassword(null);
	});
	json.setSuccess(true).setObj(result);
	return json;
}
 
Example 3
Source File: SysUserConsumerServiceImpl.java    From phone with Apache License 2.0 5 votes vote down vote up
/**
 * 分页查询
 * 
 * @param conditions
 * @param pageNum
 * @param pageSize
 * @param orderBy
 * @return
 */ 
@Override
@Logger(model = LogEnum.SysUser, type = LogOperateEnum.Select, title = "")
public Json findByPage(List<Model> conditions, int pageNum, int pageSize,String orderBy) {
	Json json = new Json();
	Page<SysUser> result = service.findByPage(conditions,pageNum,pageSize,orderBy);
	if (result == null) {
		return ErrorConfig.getSystemErrorJson();
	}
	result.forEach((su)->{
		su.setPassword(null);
	});
	json.setSuccess(true).setObj(result).setTotal(result.getPages());
	return json;
}
 
Example 4
Source File: SysUserConsumerServiceImpl.java    From phone with Apache License 2.0 5 votes vote down vote up
/**
 * 查询所有
 * 
 * @param conditions
 * @param orderBy
 * @return
 */ 
@Override
@Logger(model = LogEnum.SysUser, type = LogOperateEnum.Select, title = "")
public Json findAll(List<Model> conditions, String orderBy) {
	Json json = new Json();
	Page<SysUser> result = service.findAll(conditions,orderBy);
	if (result == null) {
		return ErrorConfig.getSystemErrorJson();
	}
	result.forEach((su)->{
		su.setPassword(null);
	});
	json.setSuccess(true).setObj(result);
	return json;
}
 
Example 5
Source File: SysUserConsumerServiceImpl.java    From phone with Apache License 2.0 5 votes vote down vote up
/**
 * 导出
 * 
 * @param conditions
 * @param orderBy
 * @return
 */ 
@Override
@Logger(model = LogEnum.SysUser, type = LogOperateEnum.Export, title = "")
public Json findByExport(List<Model> conditions, String orderBy) {
	Json json = new Json();
	Page<SysUser> result = service.findAll(conditions,orderBy);
	if (result == null) {
		return ErrorConfig.getSystemErrorJson();
	}
	result.forEach((su)->{
		su.setPassword(null);
	});
	json.setSuccess(true).setObj(result);
	return json;
}