fix: 修复关联表查询速度慢的问题
This commit is contained in:
+8
-1
@@ -459,7 +459,14 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
||||
@Override
|
||||
public IPage<TsUser> getAllUsers(TsUser tsUser) {
|
||||
List<String> ids=new ArrayList<>();
|
||||
ids.add(tsUser.getInstitutionId());
|
||||
QueryWrapper<TsInstitution> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.like("parent_id",tsUser.getInstitutionId());
|
||||
List<TsInstitution> tsmiddle=tsInstitutionService.list(queryWrapper);
|
||||
if(tsmiddle!=null && !tsmiddle.isEmpty()){
|
||||
tsmiddle.forEach(tsInstitution -> {
|
||||
ids.add(tsInstitution.getId());
|
||||
});
|
||||
}
|
||||
// List<String> middle=new ArrayList<>();
|
||||
// middle.addAll(ids);
|
||||
// boolean flag=true;
|
||||
|
||||
Reference in New Issue
Block a user