Merge branch 'master' into docker_package
This commit is contained in:
commit
72aaa294b5
|
@ -44,6 +44,7 @@ import io.renren.modules.security.user.SecurityUser;
|
|||
import io.renren.modules.sys.dao.SysDeptDao;
|
||||
import io.renren.modules.sys.dao.SysRegionDao;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.entity.SysDeptEntity;
|
||||
import io.renren.modules.sys.service.SysDeptService;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
import lombok.SneakyThrows;
|
||||
|
@ -695,8 +696,24 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
queryWrapper.eq(StringUtils.isNotBlank(jsonObject.getString("type")), "type", jsonObject.getString("type"))
|
||||
.eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag())
|
||||
.ne("type", "知识库")
|
||||
.ne("type", "赋能案例")
|
||||
.orderByDesc("create_date");
|
||||
return resourceDao.selectPage(page, queryWrapper);
|
||||
IPage<ResourceEntity> resourceEntityIPage = resourceDao.selectPage(page, queryWrapper);
|
||||
IPage<ResourceDTO> resourceDTOIPage = new Page<>();
|
||||
resourceDTOIPage.setPages(resourceEntityIPage.getPages());
|
||||
resourceDTOIPage.setTotal(resourceEntityIPage.getTotal());
|
||||
resourceDTOIPage.setCurrent(resourceEntityIPage.getCurrent());
|
||||
resourceDTOIPage.setSize(resourceEntityIPage.getSize());
|
||||
ArrayList<ResourceDTO> arrayList = new ArrayList<>();
|
||||
resourceDTOIPage.setRecords(arrayList);
|
||||
resourceEntityIPage.getRecords().forEach(item -> {
|
||||
ResourceDTO resourceDTO = new ResourceDTO();
|
||||
BeanUtils.copyProperties(item, resourceDTO);
|
||||
SysDeptEntity dept = sysDeptDao.getById(resourceDTO.getDeptId());
|
||||
resourceDTO.setDeptName(dept == null ? "" : dept.getName());
|
||||
arrayList.add(resourceDTO);
|
||||
});
|
||||
return resourceDTOIPage;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue