|
|
@@ -168,7 +168,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setClientType(loginBase.getClientType());
|
|
|
loginRes.setSystemType(loginBase.getSystemType());
|
|
|
loginRes.setToken(token);
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null,1);
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null,1,loginRes.getEntTypes());
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
|
@@ -262,7 +262,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setDriverId(user.getDriverId());
|
|
|
loginRes.setRoleName(user.getRoleName());
|
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),0);
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),0,loginRes.getEntTypes());
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
|
@@ -352,7 +352,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setRoleId(user.getRoleId());
|
|
|
loginRes.setRoleName(user.getRoleName());
|
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),0);
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),0,loginRes.getEntTypes());
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
|
@@ -858,7 +858,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setToken(newToken);
|
|
|
loginRes.setRefreshToken(newRefreshToken);
|
|
|
loginRes.setDriverId(driver.getId());
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null,1);
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, null,1,loginRes.getEntTypes());
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
|
@@ -896,7 +896,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
loginRes.setDriverId(user.getDriverId());
|
|
|
loginRes.setRoleName(user.getRoleName());
|
|
|
loginRes.setRoleList(user.getRoleInfoDto());
|
|
|
- List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),1);
|
|
|
+ List<LoginResVo1.TabBarItem> tabBar = buildAppTabBar(loginBase, user.getRoleName(),1,loginRes.getEntTypes());
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(tabBar)) {
|
|
|
loginRes.setTabBar(tabBar);
|
|
|
}
|
|
|
@@ -960,7 +960,7 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- private List<LoginResVo1.TabBarItem> buildAppTabBar(LoginBase loginBase, String roleName,int flag) {
|
|
|
+ private List<LoginResVo1.TabBarItem> buildAppTabBar(LoginBase loginBase, String roleName,int flag, String entTypeNames) {
|
|
|
if (!isAppLogin(loginBase)) {
|
|
|
return List.of();
|
|
|
}
|
|
|
@@ -974,6 +974,11 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
boolean isDriver = StringUtils.isNotBlank(roleName) && roleName.contains("司机");
|
|
|
boolean isLogistics = StringUtils.isNotBlank(roleName) && roleName.contains("物流");
|
|
|
boolean isFinance = StringUtils.isNotBlank(roleName) && roleName.contains("财务");
|
|
|
+ //企业属性 (1供应商,2采购商,34PL物流,43PL物流)
|
|
|
+ boolean isSupplierAdmin = StringUtils.isNotBlank(roleName) && roleName.contains("供应商管理员") && org.apache.commons.lang3.StringUtils.equals(entTypeNames, "1") ;
|
|
|
+ boolean isLogisticsAdmin = StringUtils.isNotBlank(roleName) && roleName.contains("物流商管理员") && org.apache.commons.lang3.StringUtils.equals(entTypeNames, "3");
|
|
|
+ boolean isPurchaseAdmin = StringUtils.isNotBlank(roleName) && roleName.contains("采购商管理员") && org.apache.commons.lang3.StringUtils.equals(entTypeNames, "2");
|
|
|
+
|
|
|
if (isDoorKeeper) {
|
|
|
return buildDoorKeeperTabBar();
|
|
|
}
|
|
|
@@ -992,9 +997,106 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
if (isLogistics){
|
|
|
return buildLogisticsTabBar();
|
|
|
}
|
|
|
+ if (isSupplierAdmin){
|
|
|
+ return buildSupplierAdminTabBar();
|
|
|
+ }
|
|
|
+ if (isLogisticsAdmin){
|
|
|
+ return buildLogisticsAdminTabBar();
|
|
|
+ }
|
|
|
+ if (isPurchaseAdmin){
|
|
|
+ return buildPurchaseAdminTabBar();}
|
|
|
return List.of();
|
|
|
}
|
|
|
|
|
|
+ private List<LoginResVo1.TabBarItem> buildPurchaseAdminTabBar() {
|
|
|
+ List<LoginResVo1.TabBarItem> items = new ArrayList<>();
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "商城",
|
|
|
+ "/static/tabbar/mall_select.png",
|
|
|
+ "/static/tabbar/mall.png",
|
|
|
+ "/pages/mall/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "贸易订单",
|
|
|
+ "/static/tabbar/trade_select.png",
|
|
|
+ "/static/tabbar/trade.png",
|
|
|
+ "/pages/tradeOrder/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "物流订单",
|
|
|
+ "/static/tabbar/logOrder_select.png",
|
|
|
+ "/static/tabbar/logOrder.png",
|
|
|
+ "/pages/logistics/order/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "物流运单",
|
|
|
+ "/static/tabbar/waybill_select.png",
|
|
|
+ "/static/tabbar/waybill.png",
|
|
|
+ "/pages/logistics/waybill/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "个人中心",
|
|
|
+ "/static/tabbar/my_select.png",
|
|
|
+ "/static/tabbar/my.png",
|
|
|
+ "/pages/myCenter/index"
|
|
|
+ ));
|
|
|
+ return items;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<LoginResVo1.TabBarItem> buildLogisticsAdminTabBar() {
|
|
|
+ List<LoginResVo1.TabBarItem> items = new ArrayList<>();
|
|
|
+
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "物流订单",
|
|
|
+ "/static/tabbar/logOrder_select.png",
|
|
|
+ "/static/tabbar/logOrder.png",
|
|
|
+ "/pages/logistics/order/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "物流运单",
|
|
|
+ "/static/tabbar/waybill_select.png",
|
|
|
+ "/static/tabbar/waybill.png",
|
|
|
+ "/pages/logistics/waybill/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "个人中心",
|
|
|
+ "/static/tabbar/my_select.png",
|
|
|
+ "/static/tabbar/my.png",
|
|
|
+ "/pages/myCenter/index"
|
|
|
+ ));
|
|
|
+ return items;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<LoginResVo1.TabBarItem> buildSupplierAdminTabBar() {
|
|
|
+ List<LoginResVo1.TabBarItem> items = new ArrayList<>();
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "贸易订单",
|
|
|
+ "/static/tabbar/trade_select.png",
|
|
|
+ "/static/tabbar/trade.png",
|
|
|
+ "/pages/tradeOrder/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "物流订单",
|
|
|
+ "/static/tabbar/logOrder_select.png",
|
|
|
+ "/static/tabbar/logOrder.png",
|
|
|
+ "/pages/logistics/order/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "物流运单",
|
|
|
+ "/static/tabbar/waybill_select.png",
|
|
|
+ "/static/tabbar/waybill.png",
|
|
|
+ "/pages/logistics/waybill/index"
|
|
|
+ ));
|
|
|
+ items.add(buildTabBarItem(
|
|
|
+ "个人中心",
|
|
|
+ "/static/tabbar/my_select.png",
|
|
|
+ "/static/tabbar/my.png",
|
|
|
+ "/pages/myCenter/index"
|
|
|
+ ));
|
|
|
+ return items;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private List<LoginResVo1.TabBarItem> buildSellerTabBar() {
|
|
|
List<LoginResVo1.TabBarItem> items = new ArrayList<>();
|
|
|
items.add(buildTabBarItem(
|