diff --git a/kernel-d-config/config-business/src/main/java/cn/stylefeng/roses/kernel/config/modular/service/impl/SysConfigServiceImpl.java b/kernel-d-config/config-business/src/main/java/cn/stylefeng/roses/kernel/config/modular/service/impl/SysConfigServiceImpl.java index e7bebfddf..d175d5f85 100644 --- a/kernel-d-config/config-business/src/main/java/cn/stylefeng/roses/kernel/config/modular/service/impl/SysConfigServiceImpl.java +++ b/kernel-d-config/config-business/src/main/java/cn/stylefeng/roses/kernel/config/modular/service/impl/SysConfigServiceImpl.java @@ -134,28 +134,29 @@ public class SysConfigServiceImpl extends ServiceImpl createWrapper(SysConfigParam sysConfigParam) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (ObjectUtil.isNotNull(sysConfigParam)) { - - String configName = sysConfigParam.getConfigName(); - String configCode = sysConfigParam.getConfigCode(); - String groupCode = sysConfigParam.getGroupCode(); - - // 如果名称不为空,则带上名称搜素搜条件 - queryWrapper.like(ObjectUtil.isNotEmpty(configName), SysConfig::getConfigName, configName); - - // 如果常量编码不为空,则带上常量编码搜素搜条件 - queryWrapper.like(ObjectUtil.isNotEmpty(configCode), SysConfig::getConfigCode, configCode); - - // 如果分类编码不为空,则带上分类编码 - queryWrapper.eq(ObjectUtil.isNotEmpty(groupCode), SysConfig::getGroupCode, groupCode); - } - // 查询未删除的 queryWrapper.ne(SysConfig::getDelFlag, YesOrNotEnum.Y.getCode()); // 按类型升序排列,同类型的排在一起 queryWrapper.orderByDesc(SysConfig::getGroupCode); + if (ObjectUtil.isEmpty(sysConfigParam)) { + return queryWrapper; + } + + String configName = sysConfigParam.getConfigName(); + String configCode = sysConfigParam.getConfigCode(); + String groupCode = sysConfigParam.getGroupCode(); + + // 如果名称不为空,则带上名称搜素搜条件 + queryWrapper.like(ObjectUtil.isNotEmpty(configName), SysConfig::getConfigName, configName); + + // 如果常量编码不为空,则带上常量编码搜素搜条件 + queryWrapper.like(ObjectUtil.isNotEmpty(configCode), SysConfig::getConfigCode, configCode); + + // 如果分类编码不为空,则带上分类编码 + queryWrapper.eq(ObjectUtil.isNotEmpty(groupCode), SysConfig::getGroupCode, groupCode); + return queryWrapper; } diff --git a/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java b/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java index 551ac638d..e0999366f 100644 --- a/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java +++ b/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java @@ -222,15 +222,19 @@ public class DatabaseInfoServiceImpl extends ServiceImpl createWrapper(DatabaseInfoRequest databaseInfoRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + // 查询没被删除的 + queryWrapper.eq(DatabaseInfo::getDelFlag, YesOrNotEnum.N.getCode()); + + if (ObjectUtil.isEmpty(databaseInfoRequest)) { + return queryWrapper; + } + // 根据名称模糊查询 String dbName = databaseInfoRequest.getDbName(); // 拼接sql 条件 queryWrapper.like(ObjectUtil.isNotEmpty(dbName), DatabaseInfo::getDbName, dbName); - // 查询没被删除的 - queryWrapper.eq(DatabaseInfo::getDelFlag, YesOrNotEnum.N.getCode()); - return queryWrapper; } diff --git a/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/service/impl/TranslationServiceImpl.java b/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/service/impl/TranslationServiceImpl.java index e6188b586..fed5daa83 100644 --- a/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/service/impl/TranslationServiceImpl.java +++ b/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/service/impl/TranslationServiceImpl.java @@ -131,6 +131,13 @@ public class TranslationServiceImpl extends ServiceImpl createWrapper(TranslationRequest translationRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + // 按翻译编码倒序排列 + queryWrapper.orderByDesc(Translation::getTranCode); + + if (ObjectUtil.isEmpty(translationRequest)) { + return queryWrapper; + } + Long tranId = translationRequest.getTranId(); String tranCode = translationRequest.getTranCode(); String tranName = translationRequest.getTranName(); @@ -142,9 +149,6 @@ public class TranslationServiceImpl extends ServiceImpl impleme private LambdaQueryWrapper createWrapper(LogManagerRequest logManagerRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + // 根据时间倒序排序 + queryWrapper.orderByDesc(SysLog::getCreateTime); + + if (ObjectUtil.isEmpty(logManagerRequest)) { + return queryWrapper; + } + String beginDateTime = logManagerRequest.getBeginDateTime(); String endDateTime = logManagerRequest.getEndDateTime(); @@ -109,9 +116,6 @@ public class SysLogServiceImpl extends ServiceImpl impleme queryWrapper.eq(StrUtil.isNotEmpty(clientIp), SysLog::getClientIp, clientIp); queryWrapper.eq(StrUtil.isNotEmpty(url), SysLog::getRequestUrl, url); - // 根据时间倒序排序 - queryWrapper.orderByDesc(SysLog::getCreateTime); - return queryWrapper; }