mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 09:01:37 +08:00 
			
		
		
		
	优化:将列表排序由按修改时间降序调整为按创建时间降序(避免修改后数据记录移动),将列表中的审计信息由“修改人”、“修改时间”调整展示为“创建人”、“创建时间”,后续涉及完整审计信息将在详情中统一展示
This commit is contained in:
		@@ -64,7 +64,7 @@ public class DeptServiceImpl extends
 | 
			
		||||
    public List<DeptVO> list(DeptQuery query) {
 | 
			
		||||
        QueryWrapper<DeptDO> queryWrapper = QueryHelper.build(query);
 | 
			
		||||
        queryWrapper.lambda().orderByAsc(DeptDO::getParentId).orderByAsc(DeptDO::getDeptSort)
 | 
			
		||||
            .orderByDesc(DeptDO::getUpdateTime);
 | 
			
		||||
            .orderByDesc(DeptDO::getCreateTime);
 | 
			
		||||
        List<DeptDO> deptList = baseMapper.selectList(queryWrapper);
 | 
			
		||||
        List<DeptVO> list = BeanUtil.copyToList(deptList, DeptVO.class);
 | 
			
		||||
        list.forEach(this::fill);
 | 
			
		||||
@@ -174,11 +174,11 @@ public class DeptServiceImpl extends
 | 
			
		||||
     *            部门信息
 | 
			
		||||
     */
 | 
			
		||||
    private void fill(DeptVO deptVO) {
 | 
			
		||||
        Long updateUser = deptVO.getUpdateUser();
 | 
			
		||||
        if (updateUser == null) {
 | 
			
		||||
        Long createUser = deptVO.getCreateUser();
 | 
			
		||||
        if (createUser == null) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        deptVO.setUpdateUserString(
 | 
			
		||||
            ExceptionUtils.exToNull(() -> userService.getById(deptVO.getUpdateUser())).getNickname());
 | 
			
		||||
        deptVO.setCreateUserString(
 | 
			
		||||
            ExceptionUtils.exToNull(() -> userService.getById(createUser)).getNickname());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user