!43 czh-20250615-选人组件增加排序
Merge pull request !43 from 陈志浩/feature/user-sortno-ip-sort
This commit is contained in:
+12
@@ -225,4 +225,16 @@ public class SysUser implements Serializable {
|
|||||||
@Dict(dicCode = "is_special")
|
@Dict(dicCode = "is_special")
|
||||||
private Integer isSpecial;
|
private Integer isSpecial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
@Excel(name = "排序号", width = 15)
|
||||||
|
private Integer sortno;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户IP
|
||||||
|
*/
|
||||||
|
@Excel(name = "用户IP", width = 15)
|
||||||
|
private String ip;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -37,6 +37,7 @@
|
|||||||
<bind name="bindRealname" value="'%'+realname+'%'"/>
|
<bind name="bindRealname" value="'%'+realname+'%'"/>
|
||||||
and a.realname like #{bindRealname}
|
and a.realname like #{bindRealname}
|
||||||
</if>
|
</if>
|
||||||
|
order by a.sortno ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据部门查询部门用户 分页 -->
|
<!-- 根据部门查询部门用户 分页 -->
|
||||||
|
|||||||
+13
@@ -191,6 +191,7 @@ public class SysUserDepartServiceImpl extends ServiceImpl<SysUserDepartMapper, S
|
|||||||
//update-begin---author:wangshuai ---date:20220902 for:[VUEN-2121]临时用户不能直接显示------------
|
//update-begin---author:wangshuai ---date:20220902 for:[VUEN-2121]临时用户不能直接显示------------
|
||||||
query.ne(SysUser::getUsername,"_reserve_user_external");
|
query.ne(SysUser::getUsername,"_reserve_user_external");
|
||||||
//update-end---author:wangshuai ---date:20220902 for:[VUEN-2121]临时用户不能直接显示------------
|
//update-end---author:wangshuai ---date:20220902 for:[VUEN-2121]临时用户不能直接显示------------
|
||||||
|
query.orderByAsc(SysUser::getSortno);
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
||||||
@@ -241,6 +242,18 @@ public class SysUserDepartServiceImpl extends ServiceImpl<SysUserDepartMapper, S
|
|||||||
// 重新设置到分页对象
|
// 重新设置到分页对象
|
||||||
pageList.setRecords(filteredUsers);
|
pageList.setRecords(filteredUsers);
|
||||||
}
|
}
|
||||||
|
// sortno升序排列
|
||||||
|
List<SysUser> records = pageList.getRecords();
|
||||||
|
if (records != null && records.size() > 0) {
|
||||||
|
records.sort((u1, u2) -> {
|
||||||
|
Integer s1 = u1.getSortno();
|
||||||
|
Integer s2 = u2.getSortno();
|
||||||
|
if (s1 == null && s2 == null) return 0;
|
||||||
|
if (s1 == null) return 1;
|
||||||
|
if (s2 == null) return -1;
|
||||||
|
return s1 - s2;
|
||||||
|
});
|
||||||
|
}
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user