From d1209552caeb9beca85a3598fc5870c860ad526c Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 7 Jun 2024 16:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=A0=8F=E7=9B=AE=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=82=AC=E6=B5=AE=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SysFloatingColumnSchemeServiceImpl.java | 63 ++++++++++++++++++- 1 file changed, 60 insertions(+), 3 deletions(-) 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