|
@@ -1,14 +1,12 @@
|
|
package com.usky.system.service.impl;
|
|
package com.usky.system.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
-import com.usky.system.domain.SysMenu;
|
|
|
|
-import com.usky.system.domain.SysMobileMenu;
|
|
|
|
-import com.usky.system.domain.SysPlatformMenu;
|
|
|
|
-import com.usky.system.domain.SysTenantMenu;
|
|
|
|
-import com.usky.system.domain.SysMobileTenantMenu;
|
|
|
|
|
|
+import com.usky.system.domain.*;
|
|
import com.usky.system.mapper.SysPlatformMenuMapper;
|
|
import com.usky.system.mapper.SysPlatformMenuMapper;
|
|
|
|
+import com.usky.system.mapper.SysTenantPlatformMapper;
|
|
import com.usky.system.service.SysMobileTenantMenuService;
|
|
import com.usky.system.service.SysMobileTenantMenuService;
|
|
import com.usky.system.service.SysPlatformMenuService;
|
|
import com.usky.system.service.SysPlatformMenuService;
|
|
import com.usky.system.service.SysTenantMenuService;
|
|
import com.usky.system.service.SysTenantMenuService;
|
|
@@ -36,6 +34,9 @@ public class SysPlatformMenuServiceImpl extends AbstractCrudService<SysPlatformM
|
|
@Autowired
|
|
@Autowired
|
|
private SysTenantMenuService sysTenantMenuService;
|
|
private SysTenantMenuService sysTenantMenuService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysTenantPlatformMapper sysTenantPlatformMapper;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private SysMobileTenantMenuService sysMobileTenantMenuService;
|
|
private SysMobileTenantMenuService sysMobileTenantMenuService;
|
|
|
|
|
|
@@ -43,8 +44,17 @@ public class SysPlatformMenuServiceImpl extends AbstractCrudService<SysPlatformM
|
|
return baseMapper.getMenuList(platformId, null);
|
|
return baseMapper.getMenuList(platformId, null);
|
|
}
|
|
}
|
|
|
|
|
|
- public List<SysMobileMenu> getMobilePlatformMenuList(Integer platformId){
|
|
|
|
- return baseMapper.getMobileMenuList(platformId, null);
|
|
|
|
|
|
+ public List<SysMobileMenu> getMobilePlatformMenuList(Integer tenantId){
|
|
|
|
+ LambdaQueryWrapper<SysTenantPlatform> queryWrapper = Wrappers.lambdaQuery();
|
|
|
|
+ queryWrapper.eq(SysTenantPlatform::getTenantId,tenantId);
|
|
|
|
+ List<SysTenantPlatform> list = sysTenantPlatformMapper.selectList(queryWrapper);
|
|
|
|
+ List<Integer> platformIds = new ArrayList<>();
|
|
|
|
+ if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
+ for (int j = 0; j < list.size(); j++) {
|
|
|
|
+ platformIds.add(list.get(j).getPlatformId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return baseMapper.getMobileMenuList(platformIds, null);
|
|
}
|
|
}
|
|
|
|
|
|
public Long[] selectPlatformMenu(Integer tenantId){
|
|
public Long[] selectPlatformMenu(Integer tenantId){
|