commit
This commit is contained in:
+10
-2
@@ -150,7 +150,7 @@ public class TeacherCongressDelegatePushController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
// @SLog(tag = "民主管理-教代会代表推选", msg = "获取本分工会下的非代表用户")
|
||||
public Result getUnionUser(String sessionId, String unionId) {
|
||||
public Result getUnionUser(String sessionId, String unionId, String keyword) {
|
||||
// 查询预选中的代表
|
||||
Cnd cndx = Cnd.where("sessionId", "=", sessionId);
|
||||
cndx.andEX("unionId", "=", SecurityUtil.getUnionId());
|
||||
@@ -173,7 +173,7 @@ public class TeacherCongressDelegatePushController {
|
||||
`vw_user` u
|
||||
LEFT JOIN teacher_congress_delegate tcd ON tcd.userId = u.id
|
||||
AND tcd.sessionId = @sessionId
|
||||
LEFT JOIN teacher_congress_delegate_push tcdp ON tcdp.userId = tcdp.id
|
||||
LEFT JOIN teacher_congress_delegate_push tcdp ON tcdp.userId = u.id
|
||||
AND tcdp.sessionId = @sessionId
|
||||
$condition
|
||||
""");
|
||||
@@ -185,6 +185,14 @@ public class TeacherCongressDelegatePushController {
|
||||
cnd.and("tcd.userId", "is", null);
|
||||
cnd.and("tcdp.id", "is", null);
|
||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||
if (StrUtil.isNotBlank(keyword)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("u.username", keyword);
|
||||
group.orLike("u.loginname", keyword);
|
||||
cnd.and(group);
|
||||
}
|
||||
// 搜索候选人时只返回少量命中数据,避免前端大列表筛选导致严重卡顿
|
||||
cnd.limit(1, 100);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> userList = baseService.listMap(sql);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user