diff --git a/src/main/java/com/huoran/iasf/service/impl/SysFloatingColumnSchemeServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysFloatingColumnSchemeServiceImpl.java index ab26610..6653fca 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysFloatingColumnSchemeServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysFloatingColumnSchemeServiceImpl.java @@ -195,6 +195,61 @@ public class SysFloatingColumnSchemeServiceImpl extends ServiceImpl columnSchemeModuleList = new ArrayList<>(); + //获取站点 + SysColumn column = columnMapper.selectById(columnId); + if (ObjectUtil.isEmpty(column)) { + return R.fail("未找到该栏目"); + } + + + //查询当前站点下已启用,且已发布的悬浮栏 + List floatingColumnSchemeList = baseMapper.selectList(new LambdaQueryWrapper() + .eq(SysFloatingColumnScheme::getSiteId, column.getSiteId()) + .eq(SysFloatingColumnScheme::getIsDisable, 0) + .eq(SysFloatingColumnScheme::getStatus, 1)); + + for (SysFloatingColumnScheme scheme : floatingColumnSchemeList) { + //判断当前启用的栏目如果为全局的直接返回全局的已启用的方案 + if (scheme.getIsGlobal() == 1) { + //查询悬浮栏当前绑定的方案 + List columnSchemeModule = floatingColumnSchemeModuleMapper.selectList(new LambdaQueryWrapper() + .eq(SysFloatingColumnSchemeModule::getFloatingBarSchemeId, scheme.getId()).eq(SysFloatingColumnSchemeModule::getIsDisable, 0)); + ; + if (!ObjectUtil.isEmpty(columnSchemeModule)) { + return R.success(columnSchemeModule); + } + }else{ + //查询栏目绑定过的悬浮栏 + List floatingBarIds = scopeOfApplicationMapper.checkBoundByColumnId(columnId); + //查询悬浮栏绑定的方案 + for (Integer floatingBarId: floatingBarIds) { + List list = floatingColumnSchemeModuleMapper.selectList(new LambdaQueryWrapper() + .eq(SysFloatingColumnSchemeModule::getFloatingBarSchemeId, floatingBarId).eq(SysFloatingColumnSchemeModule::getIsDisable, 0)); + columnSchemeModuleList.addAll(list); + } + + + + + + return R.success(columnSchemeModuleList); + + + + } + + } + + + + + + return R.success(columnSchemeModuleList); + } + + /*@Override public R columnDisplayFloatingBar(String columnId) { //获取站点 SysColumn column = columnMapper.selectById(columnId); @@ -203,10 +258,12 @@ public class SysFloatingColumnSchemeServiceImpl extends ServiceImpl sysFloatingColumnSchemeScopeOfApplications = scopeOfApplicationMapper.selectList(new LambdaQueryWrapper() + *//* List sysFloatingColumnSchemeScopeOfApplications = scopeOfApplicationMapper.selectList(new LambdaQueryWrapper() .eq(SysFloatingColumnSchemeScopeOfApplication::getFloatingBarSchemeId, columnId) ); -*/ +*//* + + //查询栏目绑定过的悬浮栏 List sysFloatingColumnSchemeScopeOfApplications = scopeOfApplicationMapper.checkBoundByColumnId(columnId); @@ -235,7 +292,7 @@ public class SysFloatingColumnSchemeServiceImpl extends ServiceImpl