Commit 86509ab6 authored by 季圣华's avatar 季圣华
Browse files

优化根据用户查询关联组织下的用户列表的方法

parent 0bd01113
......@@ -179,20 +179,19 @@ public class OrgaUserRelService {
* @throws Exception
*/
public String getUserIdListByUserId(Long userId) throws Exception{
OrgaUserRel our = new OrgaUserRel();
String users = "";
OrgaUserRelExample example = new OrgaUserRelExample();
example.createCriteria().andUserIdEqualTo(userId);
List<OrgaUserRel> list = orgaUserRelMapper.selectByExample(example);
if(list!=null && list.size()>0) {
our = list.get(0);
}
List<Long> userIdList = getUserIdListByOrgId(our.getOrgaId());
String users = "";
for(Long u: userIdList){
users = users + u + ",";
}
if(users.length()>0){
users = users.substring(0,users.length()-1);
OrgaUserRel our = list.get(0);
List<Long> userIdList = getUserIdListByOrgId(our.getOrgaId());
for(Long u: userIdList){
users = users + u + ",";
}
if(users.length()>0){
users = users.substring(0,users.length()-1);
}
}
return users;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment