diff --git a/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysConfigDataImpl.java b/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysConfigDataImpl.java index 40481715..a456b798 100644 --- a/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysConfigDataImpl.java +++ b/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysConfigDataImpl.java @@ -94,17 +94,13 @@ public class SysConfigDataImpl implements ISysConfigData, IJPACommData findAll(PageRequest pageRequest) { SysConfig query = pageRequest.getData(); - Predicate predicate = PredicateBuilder.instance(tbSysConfig.configId.isNotNull()) - .and(StringUtils.isNotEmpty(query.getConfigKey()), () -> tbSysConfig.configKey.eq(query.getConfigKey())) - + Predicate predicate = PredicateBuilder.instance() + .and(StringUtils.isNotEmpty(query.getConfigName()), () -> tbSysConfig.configName.like(query.getConfigName())) + .and(StringUtils.isNotEmpty(query.getConfigType()), () -> tbSysConfig.configType.eq(query.getConfigType())) + .and(StringUtils.isNotEmpty(query.getConfigKey()), () -> tbSysConfig.configKey.like(query.getConfigKey())) .build(); - - // TODO: 2023/5/26 抽成通用工具类方法 - Page all = baseRepository.findAll(predicate, PageBuilder.toPageable(pageRequest)); return PageBuilder.toPaging(all, SysConfig.class); - - } diff --git a/iot-common/iot-common-dao/iot-temporal-serviceImpl-ts/src/main/java/cc/iotkit/temporal/ts/service/RuleLogDataImpl.java b/iot-common/iot-common-dao/iot-temporal-serviceImpl-ts/src/main/java/cc/iotkit/temporal/ts/service/RuleLogDataImpl.java index 156fb262..c7f5249d 100644 --- a/iot-common/iot-common-dao/iot-temporal-serviceImpl-ts/src/main/java/cc/iotkit/temporal/ts/service/RuleLogDataImpl.java +++ b/iot-common/iot-common-dao/iot-temporal-serviceImpl-ts/src/main/java/cc/iotkit/temporal/ts/service/RuleLogDataImpl.java @@ -9,11 +9,10 @@ */ package cc.iotkit.temporal.ts.service; -import cc.iotkit.model.Paging; +import cc.iotkit.common.api.Paging; import cc.iotkit.model.rule.RuleLog; import cc.iotkit.temporal.IRuleLogData; import cc.iotkit.temporal.ts.dao.TsTemplate; -//import cc.iotkit.temporal.ts.dm.TableManager; import cc.iotkit.temporal.ts.dm.TableManager; import cc.iotkit.temporal.ts.model.TsRuleLog; import org.jooq.*; @@ -26,7 +25,10 @@ import java.util.Date; import java.util.List; import java.util.stream.Collectors; -import static org.jooq.impl.DSL.*; +import static org.jooq.impl.DSL.field; +import static org.jooq.impl.DSL.table; + +//import cc.iotkit.temporal.ts.dm.TableManager; @Service public class RuleLogDataImpl implements IRuleLogData { diff --git a/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysConfigController.java b/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysConfigController.java index d988a280..eb47296a 100644 --- a/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysConfigController.java +++ b/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysConfigController.java @@ -3,21 +3,24 @@ package cc.iotkit.system.controller; import cc.iotkit.common.api.PageRequest; import cc.iotkit.common.api.Paging; import cc.iotkit.common.api.Request; +import cc.iotkit.common.excel.utils.ExcelUtil; import cc.iotkit.common.log.annotation.Log; import cc.iotkit.common.log.enums.BusinessType; -import cc.iotkit.common.excel.utils.ExcelUtil; import cc.iotkit.common.validate.EditGroup; import cc.iotkit.common.validate.QueryGroup; import cc.iotkit.common.web.core.BaseController; import cc.iotkit.system.dto.bo.SysConfigBo; import cc.iotkit.system.dto.vo.SysConfigVo; -import cn.dev33.satoken.annotation.SaCheckPermission; import cc.iotkit.system.service.ISysConfigService; +import cn.dev33.satoken.annotation.SaCheckPermission; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +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 javax.servlet.http.HttpServletResponse; import java.util.List; @@ -48,9 +51,9 @@ public class SysConfigController extends BaseController { @Log(title = "参数管理", businessType = BusinessType.EXPORT) @SaCheckPermission("system:config:export") @PostMapping("/export") - public void export(@RequestBody @Validated(QueryGroup.class) Request request, + public void export(@RequestBody @Validated(QueryGroup.class) Request config, HttpServletResponse response) { - List list = configService.selectConfigList(request.getData()); + List list = configService.selectConfigList(config.getData()); ExcelUtil.exportExcel(list, "参数数据", SysConfigVo.class, response); }