Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-10-19 11:13:52 +08:00
commit 94765a612d
2 changed files with 28 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.utils.Result;
import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dao.ResourceDao;
@ -461,6 +462,8 @@ public class CensusController {
@ApiOperation("查询部门上架资源及审批结果详细信息")
@LogOperation("查询部门上架资源及审批结果详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"),
@ -526,6 +529,8 @@ public class CensusController {
@ApiOperation("查询部门申请资源及审批结果详细信息")
@LogOperation("查询部门申请资源及审批结果详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"),

View File

@ -15,6 +15,7 @@ import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.DateUtils;
import io.renren.modules.device.dto.TbDeviceApplyDTO;
import io.renren.modules.monitor.dto.CameraChannelDto1;
import io.renren.modules.monitor.entity.CameraChannel;
import io.renren.modules.monitor.mapper.CameraChannelMapper;
@ -2283,12 +2284,32 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object selectCensusResourceTable(Map params) {
return resourceDao.selectCensusResourceTable(params);
int curPage = 1;
int limit = 10;
if (params.containsKey("limit") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("limit").toString())) {
limit = Integer.parseInt(params.get("limit").toString());
}
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
curPage = Integer.parseInt(params.get("page").toString());
}
List<Map> dtoList= resourceDao.selectCensusResourceTable(params);
List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
return new PageData(result, dtoList.size());
}
@Override
public Object selectCensusApplyTable(Map params) {
return resourceDao.selectCensusApplyTable(params);
int curPage = 1;
int limit = 10;
if (params.containsKey("limit") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("limit").toString())) {
limit = Integer.parseInt(params.get("limit").toString());
}
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
curPage = Integer.parseInt(params.get("page").toString());
}
List<Map> dtoList= resourceDao.selectCensusApplyTable(params);
List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
return new PageData(result, dtoList.size());
}
}