|
@@ -50,7 +50,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
private RemoteUserService remoteUserService;
|
|
private RemoteUserService remoteUserService;
|
|
|
|
|
|
|
|
- @DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
|
|
|
|
+ @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
|
|
|
private RemoteSystemService systemService;
|
|
private RemoteSystemService systemService;
|
|
|
|
|
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@@ -167,7 +167,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setClientType(loginBase.getClientType());
|
|
loginRes.setClientType(loginBase.getClientType());
|
|
|
loginRes.setSystemType(loginBase.getSystemType());
|
|
loginRes.setSystemType(loginBase.getSystemType());
|
|
|
loginRes.setToken(token);
|
|
loginRes.setToken(token);
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null);
|
|
|
|
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null,1);
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
}
|
|
@@ -259,7 +259,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setRoleId(user.getRoleId());
|
|
loginRes.setRoleId(user.getRoleId());
|
|
|
loginRes.setRoleName(user.getRoleName());
|
|
loginRes.setRoleName(user.getRoleName());
|
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName());
|
|
|
|
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),0);
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
}
|
|
@@ -696,7 +696,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
new AsyncProcess(loginBase, null, driver, enterprise, remoteUserService).run();
|
|
new AsyncProcess(loginBase, null, driver, enterprise, remoteUserService).run();
|
|
|
|
|
|
|
|
// 构建返回结果
|
|
// 构建返回结果
|
|
|
- LoginResVo1 loginRes = buildDriverLoginRes(driver, enterprise, tokenClientType, tokenSystemType, newToken, newRefreshToken);
|
|
|
|
|
|
|
+ LoginResVo1 loginRes = buildDriverLoginRes(loginBase,driver, enterprise, tokenClientType, tokenSystemType, newToken, newRefreshToken);
|
|
|
return HttpResult.ok(loginRes);
|
|
return HttpResult.ok(loginRes);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -735,14 +735,14 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
new AsyncProcess(loginBase, user, null, enterprise, remoteUserService).run();
|
|
new AsyncProcess(loginBase, user, null, enterprise, remoteUserService).run();
|
|
|
|
|
|
|
|
// 构建返回结果
|
|
// 构建返回结果
|
|
|
- LoginResVo1 loginRes = buildCommonLoginRes(user, enterprise, tokenClientType, tokenSystemType, newToken, newRefreshToken);
|
|
|
|
|
|
|
+ LoginResVo1 loginRes = buildCommonLoginRes(loginBase,user, enterprise, tokenClientType, tokenSystemType, newToken, newRefreshToken);
|
|
|
return HttpResult.ok(loginRes);
|
|
return HttpResult.ok(loginRes);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 构建司机端登录返回结果
|
|
* 构建司机端登录返回结果
|
|
|
*/
|
|
*/
|
|
|
- private LoginResVo1 buildDriverLoginRes(RDriverDetailVo driver, EntCacheResDto enterprise,
|
|
|
|
|
|
|
+ private LoginResVo1 buildDriverLoginRes(LoginBase loginBase,RDriverDetailVo driver, EntCacheResDto enterprise,
|
|
|
String tokenClientType, Integer tokenSystemType,
|
|
String tokenClientType, Integer tokenSystemType,
|
|
|
String newToken, String newRefreshToken) {
|
|
String newToken, String newRefreshToken) {
|
|
|
LoginResVo1 loginRes = new LoginResVo1();
|
|
LoginResVo1 loginRes = new LoginResVo1();
|
|
@@ -759,13 +759,17 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setSystemType(tokenSystemType);
|
|
loginRes.setSystemType(tokenSystemType);
|
|
|
loginRes.setToken(newToken);
|
|
loginRes.setToken(newToken);
|
|
|
loginRes.setRefreshToken(newRefreshToken);
|
|
loginRes.setRefreshToken(newRefreshToken);
|
|
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null,1);
|
|
|
|
|
+ if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
|
|
+ loginRes.setTabBar(tabBar);
|
|
|
|
|
+ }
|
|
|
return loginRes;
|
|
return loginRes;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 构建运营端/企业端登录返回结果
|
|
* 构建运营端/企业端登录返回结果
|
|
|
*/
|
|
*/
|
|
|
- private LoginResVo1 buildCommonLoginRes(KwsUserResDto user, EntCacheResDto enterprise,
|
|
|
|
|
|
|
+ private LoginResVo1 buildCommonLoginRes(LoginBase loginBase,KwsUserResDto user, EntCacheResDto enterprise,
|
|
|
String tokenClientType, Integer tokenSystemType,
|
|
String tokenClientType, Integer tokenSystemType,
|
|
|
String newToken, String newRefreshToken) {
|
|
String newToken, String newRefreshToken) {
|
|
|
LoginResVo1 loginRes = new LoginResVo1();
|
|
LoginResVo1 loginRes = new LoginResVo1();
|
|
@@ -791,6 +795,10 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setRoleId(user.getRoleId());
|
|
loginRes.setRoleId(user.getRoleId());
|
|
|
loginRes.setRoleName(user.getRoleName());
|
|
loginRes.setRoleName(user.getRoleName());
|
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),1);
|
|
|
|
|
+ if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
|
|
+ loginRes.setTabBar(tabBar);
|
|
|
|
|
+ }
|
|
|
if (user.getSystemType().equals(SystemTypeEnum.MANAGE.getCode())) {
|
|
if (user.getSystemType().equals(SystemTypeEnum.MANAGE.getCode())) {
|
|
|
loginRes.setValid(true);
|
|
loginRes.setValid(true);
|
|
|
} else {
|
|
} else {
|
|
@@ -807,7 +815,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
|| Objects.equals(clientType, ClientTypeEnum.mobile.getValue());
|
|
|| Objects.equals(clientType, ClientTypeEnum.mobile.getValue());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private List<LoginResVo1.TabBarItem> buildAppTabBar(LoginBase loginBase, String roleName) {
|
|
|
|
|
|
|
+ private List<LoginResVo1.TabBarItem> buildAppTabBar(LoginBase loginBase, String roleName,int flag) {
|
|
|
if (!isAppLogin(loginBase)) {
|
|
if (!isAppLogin(loginBase)) {
|
|
|
return List.of();
|
|
return List.of();
|
|
|
}
|
|
}
|
|
@@ -819,7 +827,10 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
if (isForkliftDriver) {
|
|
if (isForkliftDriver) {
|
|
|
return buildForkliftDriverTabBar();
|
|
return buildForkliftDriverTabBar();
|
|
|
}
|
|
}
|
|
|
- return buildDefaultDriverTabBar();
|
|
|
|
|
|
|
+ if (flag == 1) {
|
|
|
|
|
+ return buildDefaultDriverTabBar();
|
|
|
|
|
+ }
|
|
|
|
|
+ return List.of();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private List<LoginResVo1.TabBarItem> buildDoorKeeperTabBar() {
|
|
private List<LoginResVo1.TabBarItem> buildDoorKeeperTabBar() {
|