|
|
|
@ -3,8 +3,6 @@ package com.huoran.iasf.controller; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
|
import com.huoran.iasf.common.exception.BusinessException; |
|
|
|
|
import com.huoran.iasf.common.exception.code.BaseResponseCode; |
|
|
|
|
import com.huoran.iasf.common.utils.R; |
|
|
|
|
import com.huoran.iasf.entity.SysFloatingColumnScheme; |
|
|
|
|
import com.huoran.iasf.entity.SysFloatingColumnSchemeModule; |
|
|
|
@ -62,7 +60,7 @@ public class SysFloatingColumnSchemeController { |
|
|
|
|
if (!schemeTitles.add(module.getSchemeTitle())) { |
|
|
|
|
// throw new IllegalArgumentException(module.getSchemeTitle() + " 标题已存在");
|
|
|
|
|
|
|
|
|
|
String msg = module.getSchemeTitle() + " 标题已存在"; |
|
|
|
|
String msg = module.getSchemeTitle() + " 标题已存在"; |
|
|
|
|
|
|
|
|
|
/*throw new RuntimeException(msg);*/ |
|
|
|
|
return R.fail(msg); |
|
|
|
@ -98,7 +96,9 @@ public class SysFloatingColumnSchemeController { |
|
|
|
|
// 处理全局悬浮栏逻辑
|
|
|
|
|
if (sysFloatingColumnScheme.getIsGlobal() == 1) { |
|
|
|
|
// 确保没有其他全局悬浮栏同时启用
|
|
|
|
|
long globalCount = service.count(new QueryWrapper<SysFloatingColumnScheme>().eq("is_global", true).eq("is_disable", 0).ne("id", sysFloatingColumnScheme.getId())); |
|
|
|
|
long globalCount = service.count(new QueryWrapper<SysFloatingColumnScheme>().eq("is_global", true) |
|
|
|
|
.eq("site_id", sysFloatingColumnScheme.getSiteId()) |
|
|
|
|
.eq("is_disable", 0).ne("id", sysFloatingColumnScheme.getId())); |
|
|
|
|
if (globalCount > 0) { |
|
|
|
|
return R.fail("已经有全局悬浮栏启用,请先禁用后再尝试设置"); |
|
|
|
|
} |
|
|
|
@ -143,7 +143,6 @@ public class SysFloatingColumnSchemeController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/floatingBarList") |
|
|
|
|
@ApiOperation(value = "悬浮栏列表", response = SysFloatingColumnSchemeVO.class) |
|
|
|
|
public R floatingBarList(@RequestBody SuspensionBarListPagingReq sysFloatingColumnScheme) { |
|
|
|
|