|
@@ -88,6 +88,7 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
|
|
TenantDo tenantDo = new TenantDo();
|
|
TenantDo tenantDo = new TenantDo();
|
|
if (userByDsKey != null && !userByDsKey.isEmpty()) {
|
|
if (userByDsKey != null && !userByDsKey.isEmpty()) {
|
|
tenantDo.setDskey(userByDsKey.get(0).getDsKey());
|
|
tenantDo.setDskey(userByDsKey.get(0).getDsKey());
|
|
|
|
+ tenantDo.setId(userByDsKey.get(0).getDsId());
|
|
}
|
|
}
|
|
sysUserVo.setTenantDo(tenantDo);
|
|
sysUserVo.setTenantDo(tenantDo);
|
|
if(autoWeChatLoginApiPara.isNeverExpires()){
|
|
if(autoWeChatLoginApiPara.isNeverExpires()){
|
|
@@ -139,8 +140,8 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
|
|
*/
|
|
*/
|
|
// 获取系统中的所有户号信息
|
|
// 获取系统中的所有户号信息
|
|
public List<SwUserManagementVo> getAllOwnerByOpenId(String openId, List<String> dsKeyList) {
|
|
public List<SwUserManagementVo> getAllOwnerByOpenId(String openId, List<String> dsKeyList) {
|
|
|
|
+ List<TenantDo> tenantDos = commonBusinessDao.getById("");
|
|
if (dsKeyList == null || dsKeyList.isEmpty()) {
|
|
if (dsKeyList == null || dsKeyList.isEmpty()) {
|
|
- List<TenantDo> tenantDos = commonBusinessDao.getById("");
|
|
|
|
dsKeyList = tenantDos.stream().map(TenantDo::getDskey).collect(Collectors.toList());
|
|
dsKeyList = tenantDos.stream().map(TenantDo::getDskey).collect(Collectors.toList());
|
|
}
|
|
}
|
|
// 获取当前用户所绑定的所有用户信息
|
|
// 获取当前用户所绑定的所有用户信息
|
|
@@ -169,6 +170,10 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
|
|
// }).collect(Collectors.toList());
|
|
// }).collect(Collectors.toList());
|
|
// login.setWaterCompany(waterCompany);
|
|
// login.setWaterCompany(waterCompany);
|
|
List<SwUserManagementVo> userByDsKey = swUserManagementService.getBaseMapper().getUserByDsKey(dsANdOwnerIdMap, openId);
|
|
List<SwUserManagementVo> userByDsKey = swUserManagementService.getBaseMapper().getUserByDsKey(dsANdOwnerIdMap, openId);
|
|
|
|
+ userByDsKey.forEach(data->{
|
|
|
|
+ TenantDo tenantDo = tenantDos.stream().filter(info -> info.getDskey().equals(data.getDsKey())).findFirst().orElse(null);
|
|
|
|
+ data.setDsId(tenantDo.getId());
|
|
|
|
+ });
|
|
// userByDsKey.stream().collect(Collectors.groupingBy(SwUserManagementVo::getDsKey,Collectors.mapping(get)))
|
|
// userByDsKey.stream().collect(Collectors.groupingBy(SwUserManagementVo::getDsKey,Collectors.mapping(get)))
|
|
// redisService.redisCatchInit(openId, sysUserVo, DEFAULT_OWNER_CACHE_SECONDS);
|
|
// redisService.redisCatchInit(openId, sysUserVo, DEFAULT_OWNER_CACHE_SECONDS);
|
|
return userByDsKey;
|
|
return userByDsKey;
|