Commit 3027caa1d2dbf4290f5a611ab5eff3c699af602d

Authored by haohao
1 parent 832b36ac

feat:【iot】新增数据目的类型字段及其查询条件

yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/rule/vo/data/sink/IotDataSinkPageReqVO.java
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.iot.controller.admin.rule.vo.data.sink; @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.iot.controller.admin.rule.vo.data.sink;
3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
4 import cn.iocoder.yudao.framework.common.pojo.PageParam; 4 import cn.iocoder.yudao.framework.common.pojo.PageParam;
5 import cn.iocoder.yudao.framework.common.validation.InEnum; 5 import cn.iocoder.yudao.framework.common.validation.InEnum;
  6 +import cn.iocoder.yudao.module.iot.enums.rule.IotDataSinkTypeEnum;
6 import io.swagger.v3.oas.annotations.media.Schema; 7 import io.swagger.v3.oas.annotations.media.Schema;
7 import lombok.Data; 8 import lombok.Data;
8 import org.springframework.format.annotation.DateTimeFormat; 9 import org.springframework.format.annotation.DateTimeFormat;
@@ -22,6 +23,10 @@ public class IotDataSinkPageReqVO extends PageParam { @@ -22,6 +23,10 @@ public class IotDataSinkPageReqVO extends PageParam {
22 @InEnum(CommonStatusEnum.class) 23 @InEnum(CommonStatusEnum.class)
23 private Integer status; 24 private Integer status;
24 25
  26 + @Schema(description = "数据目的类型", example = "1")
  27 + @InEnum(IotDataSinkTypeEnum.class)
  28 + private Integer type;
  29 +
25 @Schema(description = "创建时间") 30 @Schema(description = "创建时间")
26 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 31 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
27 private LocalDateTime[] createTime; 32 private LocalDateTime[] createTime;
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/mysql/rule/IotDataSinkMapper.java
@@ -21,6 +21,7 @@ public interface IotDataSinkMapper extends BaseMapperX<IotDataSinkDO> { @@ -21,6 +21,7 @@ public interface IotDataSinkMapper extends BaseMapperX<IotDataSinkDO> {
21 return selectPage(reqVO, new LambdaQueryWrapperX<IotDataSinkDO>() 21 return selectPage(reqVO, new LambdaQueryWrapperX<IotDataSinkDO>()
22 .likeIfPresent(IotDataSinkDO::getName, reqVO.getName()) 22 .likeIfPresent(IotDataSinkDO::getName, reqVO.getName())
23 .eqIfPresent(IotDataSinkDO::getStatus, reqVO.getStatus()) 23 .eqIfPresent(IotDataSinkDO::getStatus, reqVO.getStatus())
  24 + .eqIfPresent(IotDataSinkDO::getType, reqVO.getType())
24 .betweenIfPresent(IotDataSinkDO::getCreateTime, reqVO.getCreateTime()) 25 .betweenIfPresent(IotDataSinkDO::getCreateTime, reqVO.getCreateTime())
25 .orderByDesc(IotDataSinkDO::getId)); 26 .orderByDesc(IotDataSinkDO::getId));
26 } 27 }