From bde6b8996580f9f7979a78e4a0f71801171b640f Mon Sep 17 00:00:00 2001 From: rqian <1206436827@qq.com> Date: Mon, 12 Oct 2026 15:40:23 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=A2=9E=E5=8A=A0=E7=B3=BB=E7=BB=9F=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysParamController.java | 53 +++++++++ .../main/resources/i18n/messages.properties | 25 +++++ .../resources/i18n/messages_en_US.properties | 29 +++++ .../resources/i18n/messages_zh_CN.properties | 28 +++++ .../maibu/core/domain/entity/SysParam.java | 40 +++++++ .../java/com/maibu/core/enums/AlarmType.java | 53 +++++---- .../com/maibu/core/enums/SysParamType.java | 22 ++++ .../main/java/com/maibu/init/InitThread.java | 102 +++++++++++++++--- .../src/main/resources/systemParam.json | 65 +++++++++++ .../java/com/maibu/mapper/SysParamMapper.java | 14 +++ .../com/maibu/service/SysParamService.java | 46 ++++++++ .../com/maibu/service/SysSiteService.java | 20 ++-- 12 files changed, 444 insertions(+), 53 deletions(-) create mode 100644 maibu-admin/src/main/java/com/maibu/web/controller/system/SysParamController.java create mode 100644 maibu-common/src/main/java/com/maibu/core/domain/entity/SysParam.java create mode 100644 maibu-common/src/main/java/com/maibu/core/enums/SysParamType.java create mode 100644 maibu-netty-server/src/main/resources/systemParam.json create mode 100644 maibu-service/maibu-system-service/src/main/java/com/maibu/mapper/SysParamMapper.java create mode 100644 maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysParamService.java diff --git a/maibu-admin/src/main/java/com/maibu/web/controller/system/SysParamController.java b/maibu-admin/src/main/java/com/maibu/web/controller/system/SysParamController.java new file mode 100644 index 0000000..31e1302 --- /dev/null +++ b/maibu-admin/src/main/java/com/maibu/web/controller/system/SysParamController.java @@ -0,0 +1,53 @@ +package com.maibu.web.controller.system; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.maibu.core.controller.BaseController; +import com.maibu.core.domain.AjaxResult; +import com.maibu.core.domain.entity.SysParam; +import com.maibu.service.SysParamService; + +/** + * 系统参数管理 + * + * @author ruoyi + */ +@RestController +@RequestMapping("/system/param") +public class SysParamController extends BaseController { + @Autowired + private SysParamService sysParamService; + + /** + * 查询系统参数列表 + */ + @GetMapping("/list") + public AjaxResult list() { + try { + return AjaxResult.success(sysParamService.list()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * 新增或者修改系统参数 + */ + + @PostMapping("/save") + public AjaxResult save(@RequestBody List sysParams) { + try { + return AjaxResult.success(sysParamService.save(sysParams)); + } catch (Exception e) { + return AjaxResult.error("新增修改系统参数出错", e.getMessage()); + } + } + +} diff --git a/maibu-admin/src/main/resources/i18n/messages.properties b/maibu-admin/src/main/resources/i18n/messages.properties index a17c1e4..1adc50f 100644 --- a/maibu-admin/src/main/resources/i18n/messages.properties +++ b/maibu-admin/src/main/resources/i18n/messages.properties @@ -1,3 +1,28 @@ +system.param.systemName.name = 系统名称 +system.param.systemName.desc = 系统名称 + +system.param.defaultStationName.name = 默认场站 +system.param.defaultStationName.desc = "默认场站 + +system.param.defaultLanguage.name = 默认语言 +system.param.defaultLanguage.desc = 默认语言 + +system.param.defaultZoneId.name = 默认时区 +system.param.defaultZoneId.desc = 默认时区 + +system.param.daylightSavingTime.name = 夏令时 +system.param.daylightSavingTime.desc = 夏令时 + +system.param.defaultUnit.name = 默认单位 +system.param.defaultUnit.desc = 默认单位 + +system.param.defaultDateFormat.name = 默认日期格式 +system.param.defaultDateFormat.desc = 默认日期格式 + + + + + #\u9519\u8BEF\u6D88\u606F not.null=* \u5FC5\u987B\u586B\u5199 user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF diff --git a/maibu-admin/src/main/resources/i18n/messages_en_US.properties b/maibu-admin/src/main/resources/i18n/messages_en_US.properties index eea9a3a..1c8dd02 100644 --- a/maibu-admin/src/main/resources/i18n/messages_en_US.properties +++ b/maibu-admin/src/main/resources/i18n/messages_en_US.properties @@ -1,3 +1,32 @@ +system.param.systemName.name = System Name +system.param.systemName.desc = System Name + +system.param.defaultStationName.name = Default Station +system.param.defaultStationName.desc = Default Station + +system.param.defaultLanguage.name = Default Language +system.param.defaultLanguage.desc = Default Language + +system.param.defaultZoneId.name = Default Zone +system.param.defaultZoneId.desc = Default Zone + +system.param.daylightSavingTime.name = Daylight Saving Time +system.param.daylightSavingTime.desc = Daylight Saving Time + +system.param.defaultUnit.name = Default Unit +system.param.defaultUnit.desc = Default Unit + +system.param.defaultDateFormat.name = Default Date Format +system.param.defaultDateFormat.desc = Default Date Format + + + + + + + + + #\u9519\u8BEF\u6D88\u606F not.null=* \u5FC5\u987B\u586B\u5199 user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF diff --git a/maibu-admin/src/main/resources/i18n/messages_zh_CN.properties b/maibu-admin/src/main/resources/i18n/messages_zh_CN.properties index 3d1f15d..27a5194 100644 --- a/maibu-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/maibu-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -1,3 +1,31 @@ +system.param.systemName.name = 系统名称 +system.param.systemName.desc = 系统名称 + +system.param.defaultStationName.name = 默认场站 +system.param.defaultStationName.desc = "默认场站 + +system.param.defaultLanguage.name = 默认语言 +system.param.defaultLanguage.desc = 默认语言 + +system.param.defaultZoneId.name = 默认时区 +system.param.defaultZoneId.desc = 默认时区 + +system.param.daylightSavingTime.name = 夏令时 +system.param.daylightSavingTime.desc = 夏令时 + +system.param.defaultUnit.name = 默认单位 +system.param.defaultUnit.desc = 默认单位 + +system.param.defaultDateFormat.name = 默认日期格式 +system.param.defaultDateFormat.desc = 默认日期格式 + + + + + + + + #\u9519\u8BEF\u6D88\u606F not.null=* \u5FC5\u987B\u586B\u5199 user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF diff --git a/maibu-common/src/main/java/com/maibu/core/domain/entity/SysParam.java b/maibu-common/src/main/java/com/maibu/core/domain/entity/SysParam.java new file mode 100644 index 0000000..3602b5d --- /dev/null +++ b/maibu-common/src/main/java/com/maibu/core/domain/entity/SysParam.java @@ -0,0 +1,40 @@ +package com.maibu.core.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.maibu.core.domain.OrgNoUserDO; +import com.maibu.core.enums.SysParamType; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +@TableName(value = "sys_param") +public class SysParam extends OrgNoUserDO { + + @TableId(type = IdType.AUTO) + private Long id; + + private SysParamType paramType; + + private String paramKey; + + private String nameTranslateKey; + + private String paramValue; + + private String descTranslateKey; + + @TableField(exist = false) + private String nameTranslate; + @TableField(exist = false) + private String descTranslate; + + private String valueRange; + + private String dataType; + +} diff --git a/maibu-common/src/main/java/com/maibu/core/enums/AlarmType.java b/maibu-common/src/main/java/com/maibu/core/enums/AlarmType.java index 29c5b0c..83ef3b2 100644 --- a/maibu-common/src/main/java/com/maibu/core/enums/AlarmType.java +++ b/maibu-common/src/main/java/com/maibu/core/enums/AlarmType.java @@ -1,27 +1,26 @@ -package com.maibu.core.enums; - -import com.maibu.annotation.Excel; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum AlarmType { - - UAV_FAULT("UAV_FAULT", "无人机故障"), - - MOWER_FAULT("MOWER_FAULT", "割草机故障"), - - OTHER_DEVICE_FAULT("OTHER_DEVICE_FAULT", "其他设备故障"), - - SERVER_FAILURE("SERVER_FAILURE", "服务器故障"), - - SYSTEM_ERROR("SYSTEM_ERROR", "系统错误"); - - /** 错误来源值(存储在数据库中) */ - private final String value; - - /** 错误来源名称(用于前端显示) */ - private final String name; - -} +package com.maibu.core.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum AlarmType { + + UAV_FAULT("UAV_FAULT", "无人机故障"), + + MOWER_FAULT("MOWER_FAULT", "割草机故障"), + + OTHER_DEVICE_FAULT("OTHER_DEVICE_FAULT", "其他设备故障"), + + SERVER_FAILURE("SERVER_FAILURE", "服务器故障"), + + SYSTEM_ERROR("SYSTEM_ERROR", "系统错误"); + + /** 错误来源值(存储在数据库中) */ + private final String value; + + /** 错误来源名称(用于前端显示) */ + private final String name; + +} diff --git a/maibu-common/src/main/java/com/maibu/core/enums/SysParamType.java b/maibu-common/src/main/java/com/maibu/core/enums/SysParamType.java new file mode 100644 index 0000000..e8298d6 --- /dev/null +++ b/maibu-common/src/main/java/com/maibu/core/enums/SysParamType.java @@ -0,0 +1,22 @@ +package com.maibu.core.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum SysParamType { + + site("site", "场站维度"), + + org("org", "组织维度"), + + global("global", "全局维度"), + + personal("personal", "个人维度"); + + private final String value; + + private final String name; + +} diff --git a/maibu-netty-server/src/main/java/com/maibu/init/InitThread.java b/maibu-netty-server/src/main/java/com/maibu/init/InitThread.java index f2e0b43..02dfa23 100644 --- a/maibu-netty-server/src/main/java/com/maibu/init/InitThread.java +++ b/maibu-netty-server/src/main/java/com/maibu/init/InitThread.java @@ -1,34 +1,64 @@ package com.maibu.init; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; +import java.util.stream.Collectors; import javax.annotation.Resource; -import com.maibu.core.business.*; -import com.maibu.mapper.*; -import com.maibu.service.impl.IotDeviceCommonService; +import org.checkerframework.checker.units.qual.s; import org.eclipse.paho.client.mqttv3.MqttException; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.annotation.Order; +import org.springframework.core.io.ResourceLoader; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.maibu.constant.FastBeeConstant; +import com.maibu.core.business.AlarmOrderConfig; +import com.maibu.core.business.Device; +import com.maibu.core.business.DeviceModel; +import com.maibu.core.business.DevicePlan; +import com.maibu.core.business.DevicePlanTask; +import com.maibu.core.business.DeviceRunParam; +import com.maibu.core.business.ErrorIdentificationStandard; +import com.maibu.core.business.IoTCommonDevice; +import com.maibu.core.business.OrderModel; +import com.maibu.core.business.Product; +import com.maibu.core.domain.entity.SysParam; import com.maibu.core.domain.entity.SysSite; import com.maibu.core.enums.DeviceTaskStaus; import com.maibu.influxdb.util.InfluxDBUtil; +import com.maibu.mapper.AlarmOrderConfigMapper; +import com.maibu.mapper.DevicePlanMapper; +import com.maibu.mapper.DevicePlanTaskMapper; +import com.maibu.mapper.DeviceProductMapper; +import com.maibu.mapper.DeviceRunParamMapper; +import com.maibu.mapper.ErrorIdentificationStandardMapper; +import com.maibu.mapper.IotDeviceCommonMapper; +import com.maibu.mapper.OrderModelMapper; +import com.maibu.mapper.SysDeviceModelMapper; +import com.maibu.mapper.SysParamMapper; +import com.maibu.mapper.SysSiteMapper; import com.maibu.memory.GlobalMemory; import com.maibu.memory.SiteMemory; -import com.maibu.mqtt.MqttClientUtil; import com.maibu.mybatis.LambdaQueryWrapperX; import com.maibu.service.DevicePlanTaskMonitorService; import com.maibu.service.DeviceThreadService; -import org.springframework.beans.factory.annotation.Value; +import com.maibu.service.impl.IotDeviceCommonService; + +import cn.hutool.core.io.IORuntimeException; +import cn.hutool.core.io.IoUtil; import lombok.extern.slf4j.Slf4j; @Slf4j @@ -81,6 +111,7 @@ public class InitThread implements ApplicationRunner { @Autowired private ErrorIdentificationStandardMapper errorIdentificationStandardMapper; @Autowired + private OrderModelMapper orderModelMapper; @Autowired private AlarmOrderConfigMapper alarmOrderConfigMapper; @@ -88,6 +119,12 @@ public class InitThread implements ApplicationRunner { @Autowired private IotDeviceCommonService commonService; + @Autowired + private ResourceLoader resourceLoader; + + @Autowired + private SysParamMapper sysParamMapper; + @Value("${influxdb.url}") private String influxDBUrl; @@ -119,12 +156,15 @@ public class InitThread implements ApplicationRunner { private String mqttClientId; @Override - public void run(ApplicationArguments args) throws MqttException { + public void run(ApplicationArguments args) throws Exception { recoverMemory(); init(); } - private void init() throws MqttException { + private void init() throws Exception { + //初始化系统参数 + initSystemParam(); + // 初始化InfluxDBUtil GlobalMemory.influxDBUtil = new InfluxDBUtil(influxDBUrl, influxDBToken, influxDBOrg, influxDBBucket); @@ -185,7 +225,7 @@ public class InitThread implements ApplicationRunner { }); } - //外部设备 + // 外部设备 List ioTCommonDeviceList = iotDeviceCommonMapper.selectList(); if (!CollectionUtils.isEmpty(ioTCommonDeviceList)) { ioTCommonDeviceList.forEach(x -> { @@ -197,7 +237,7 @@ public class InitThread implements ApplicationRunner { } }); } - //产品 + // 产品 List productList = deviceProductMapper.selectList(); if (!CollectionUtils.isEmpty(productList)) { productList.forEach(x -> { @@ -209,7 +249,7 @@ public class InitThread implements ApplicationRunner { } }); } - //设备模型 + // 设备模型 List deviceModelList = deviceModelMapper.selectList(); if (!CollectionUtils.isEmpty(deviceModelList)) { deviceModelList.forEach(x -> { @@ -221,7 +261,7 @@ public class InitThread implements ApplicationRunner { } }); } - //车辆参数 + // 车辆参数 List deviceRunParamList = deviceRunParamMapper.selectList(); if (!CollectionUtils.isEmpty(deviceRunParamList)) { deviceRunParamList.forEach(x -> { @@ -233,7 +273,7 @@ public class InitThread implements ApplicationRunner { } }); } - //错误标准 + // 错误标准 List standadList = errorIdentificationStandardMapper.selectList(); if (!CollectionUtils.isEmpty(standadList)) { standadList.forEach(x -> { @@ -245,7 +285,7 @@ public class InitThread implements ApplicationRunner { } }); } - //订单模型 + // 订单模型 List orderModelList = orderModelMapper.selectList(); if (!CollectionUtils.isEmpty(orderModelList)) { orderModelList.forEach(x -> { @@ -257,7 +297,7 @@ public class InitThread implements ApplicationRunner { } }); } - //告警订单配置 + // 告警订单配置 List alarmOrderList = alarmOrderConfigMapper.selectList(); if (!CollectionUtils.isEmpty(alarmOrderList)) { alarmOrderList.forEach(x -> { @@ -317,4 +357,38 @@ public class InitThread implements ApplicationRunner { } } + + public void initSystemParam() throws IOException { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + List list = sysParamMapper.selectList(queryWrapper); + try { + // 读取resource目录下的dsystemParam.json文件 + org.springframework.core.io.Resource resource = resourceLoader + .getResource("classpath:systemParam.json"); + // 使用fastjson2转换为DeviceConfig对象 + String jsonContent; + jsonContent = IoUtil.readUtf8(resource.getInputStream()); + List params = JSON.parseArray(jsonContent, SysParam.class); + List saveList = new ArrayList<>(); + if (CollectionUtils.isEmpty(list)) { + saveList.addAll(params); + } else { + Map map = list.stream() + .collect(Collectors.toMap( + SysParam::getParamKey, + sysParam -> sysParam)); + if (!CollectionUtils.isEmpty(params)) { + params.forEach(x -> { + if (!map.containsKey(x.getParamKey())) { + saveList.add(x); + } + }); + } + } + sysParamMapper.saveOrUpdateBatch(saveList); + } catch (Exception e) { + log.error("初始化系统参数失败", e); + } + + } } diff --git a/maibu-netty-server/src/main/resources/systemParam.json b/maibu-netty-server/src/main/resources/systemParam.json new file mode 100644 index 0000000..2f8f605 --- /dev/null +++ b/maibu-netty-server/src/main/resources/systemParam.json @@ -0,0 +1,65 @@ +[ + { + "paramType": "global", + "paramKey": "systemName", + "nameTranslateKey": "system.param.systemName.name", + "paramValue": "光伏机器人环境感知服务平台", + "descTranslateKey": "system.param.systemName.desc", + "dataType": "String", + "range": "" + }, + { + "paramType": "global", + "paramKey": "defaultStationName", + "nameTranslateKey": "system.param.defaultStationName.name", + "paramValue": "", + "descTranslateKey": "system.param.defaultStationName.desc", + "dataType": "String", + "range": "" + }, + { + "paramType": "global", + "paramKey": "defaultLanguage", + "nameTranslateKey": "system.param.defaultLanguage.name", + "paramValue": "zh_CN", + "descTranslateKey": "system.param.defaultLanguage.desc", + "dataType": "String", + "range": "" + }, + { + "paramType": "global", + "paramKey": "defaultZoneId", + "nameTranslateKey": "system.param.defaultZoneId.name", + "paramValue": "Asia/Shanghai", + "descTranslateKey": "system.param.defaultZoneId.desc", + "dataType": "String", + "range": "" + }, + { + "paramType": "global", + "paramKey": "daylightSavingTime", + "nameTranslateKey": "system.param.daylightSavingTime.name", + "paramValue": "true", + "descTranslateKey": "system.param.daylightSavingTime.desc", + "dataType": "Boolean", + "range": "" + }, + { + "paramType": "global", + "paramKey": "defaultUnit", + "nameTranslateKey": "system.param.defaultUnit.name", + "paramValue": "公制", + "descTranslateKey": "system.param.defaultUnit.desc", + "dataType": "String", + "range": "" + }, + { + "paramType": "global", + "paramKey": "defaultDateFormat", + "nameTranslateKey": "system.param.defaultDateFormat.name", + "paramValue": "YYYY-MM-DD HH:mm:ss", + "descTranslateKey": "system.param.defaultDateFormat.desc", + "dataType": "String", + "range": "" + } +] \ No newline at end of file diff --git a/maibu-service/maibu-system-service/src/main/java/com/maibu/mapper/SysParamMapper.java b/maibu-service/maibu-system-service/src/main/java/com/maibu/mapper/SysParamMapper.java new file mode 100644 index 0000000..07a044a --- /dev/null +++ b/maibu-service/maibu-system-service/src/main/java/com/maibu/mapper/SysParamMapper.java @@ -0,0 +1,14 @@ +package com.maibu.mapper; + +import org.springframework.stereotype.Repository; + +import com.maibu.core.domain.entity.SysParam; +import com.maibu.mybatis.mapper.BaseMapperX; + +/** + * 设备历史状态 + */ +@Repository +public interface SysParamMapper extends BaseMapperX { + +} diff --git a/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysParamService.java b/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysParamService.java new file mode 100644 index 0000000..bbc13ac --- /dev/null +++ b/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysParamService.java @@ -0,0 +1,46 @@ +package com.maibu.service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.maibu.core.domain.entity.SysParam; +import com.maibu.core.enums.SysParamType; +import com.maibu.mapper.SysParamMapper; +import com.maibu.utils.MessageUtils; + +@Service +public class SysParamService { + + @Autowired + private SysParamMapper sysParamMapper; + + public Map> list() { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + List sysParams = sysParamMapper.selectList(queryWrapper); + translateSysParam(sysParams); + Map> result = sysParams.stream() + .collect(Collectors.groupingBy(SysParam::getParamType)); + + return result; + } + + public void translateSysParam(List sysParams) { + if (!CollectionUtils.isEmpty(sysParams)) { + sysParams.forEach(x -> { + x.setNameTranslate(MessageUtils.message(x.getNameTranslateKey())); + x.setDescTranslate(MessageUtils.message(x.getDescTranslateKey())); + }); + } + } + + public boolean save(List sysParam) { + return sysParamMapper.saveOrUpdateBatch(sysParam); + } + +} diff --git a/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysSiteService.java b/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysSiteService.java index 49828df..fb31b5d 100644 --- a/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysSiteService.java +++ b/maibu-service/maibu-system-service/src/main/java/com/maibu/service/SysSiteService.java @@ -1,15 +1,6 @@ package com.maibu.service; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.maibu.core.business.Device; -import com.maibu.core.domain.entity.SysRole; -import com.maibu.core.domain.entity.SysSite; -import com.maibu.core.domain.model.LoginUser; -import com.maibu.exception.ServiceException; -import com.maibu.mapper.SysRegionMapper; -import com.maibu.mapper.SysSiteMapper; -import com.maibu.memory.GlobalMemory; -import com.maibu.memory.SiteMemory; +import java.util.List; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -17,8 +8,13 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.List; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.maibu.core.domain.entity.SysRole; +import com.maibu.core.domain.entity.SysSite; +import com.maibu.core.domain.model.LoginUser; +import com.maibu.mapper.SysSiteMapper; +import com.maibu.memory.GlobalMemory; +import com.maibu.memory.SiteMemory; @Service public class SysSiteService {