Browse Source

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

haohao 7 months ago
parent
commit
3027caa1d2

+ 5 - 0
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;
 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
 import cn.iocoder.yudao.framework.common.validation.InEnum;
+import cn.iocoder.yudao.module.iot.enums.rule.IotDataSinkTypeEnum;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -22,6 +23,10 @@ public class IotDataSinkPageReqVO extends PageParam {
     @InEnum(CommonStatusEnum.class)
     private Integer status;
 
+    @Schema(description = "数据目的类型", example = "1")
+    @InEnum(IotDataSinkTypeEnum.class)
+    private Integer type;
+
     @Schema(description = "创建时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;

+ 1 - 0
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> {
         return selectPage(reqVO, new LambdaQueryWrapperX<IotDataSinkDO>()
                 .likeIfPresent(IotDataSinkDO::getName, reqVO.getName())
                 .eqIfPresent(IotDataSinkDO::getStatus, reqVO.getStatus())
+                .eqIfPresent(IotDataSinkDO::getType, reqVO.getType())
                 .betweenIfPresent(IotDataSinkDO::getCreateTime, reqVO.getCreateTime())
                 .orderByDesc(IotDataSinkDO::getId));
     }