| | |
| | | .collect(Collectors.toList()); // 转换为列表*/ |
| | | return unameList; |
| | | } |
| | | //获取区域对应的用户对象 |
| | | //获取区域对应的用户对象(去除自己) |
| | | public List getUinfByAreaIds(List areaList) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.select("distinct uid","uname"); |
| | |
| | | mapper.insertBatchSomeColumn(areaUserList); |
| | | } |
| | | } |
| | | //通过区域id查询所有的用户 |
| | | public List selectUidByAreaId(List areaList) { |
| | | QueryWrapper uinfWrapper=new QueryWrapper(); |
| | | uinfWrapper.select("distinct uid"); |
| | | uinfWrapper.in("area_id",areaList); |
| | | List<AreaUser> list=mapper.selectList(uinfWrapper); |
| | | List uList=list.stream().map(AreaUser::getUid) // 提取用户名 |
| | | .collect(Collectors.toList()); // 转换为列表*/ |
| | | return uList; |
| | | } |
| | | } |