Commit 779cde24ecbd3a8f23ed9f46953e028c175a5867
1 parent
1beb5c03
reactor:【IoT 物联网】调整下 IotSceneRuleAction 等类名
Showing
13 changed files
with
32 additions
and
42 deletions
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/IotAlertConfigController.java
| @@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.iot.controller.admin.alert; | @@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.iot.controller.admin.alert; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 6 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigPageReqVO; | ||
| 7 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigRespVO; | ||
| 8 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigSaveReqVO; | 6 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigPageReqVO; |
| 7 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigRespVO; | ||
| 8 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigSaveReqVO; | ||
| 9 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; | 9 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; |
| 10 | import cn.iocoder.yudao.module.iot.service.alert.IotAlertConfigService; | 10 | import cn.iocoder.yudao.module.iot.service.alert.IotAlertConfigService; |
| 11 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; | 11 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/vo/IotAlertConfigPageReqVO.java renamed to yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/vo/config/IotAlertConfigPageReqVO.java
| 1 | -package cn.iocoder.yudao.module.iot.controller.admin.alert.vo; | 1 | +package cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/vo/IotAlertConfigRespVO.java renamed to yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/vo/config/IotAlertConfigRespVO.java
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/vo/IotAlertConfigSaveReqVO.java renamed to yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/alert/vo/config/IotAlertConfigSaveReqVO.java
| 1 | -package cn.iocoder.yudao.module.iot.controller.admin.alert.vo; | 1 | +package cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config; |
| 2 | 2 | ||
| 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.validation.InEnum; | 4 | import cn.iocoder.yudao.framework.common.validation.InEnum; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/dataobject/alert/IotAlertRecordDO.java
| @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceDO; | @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceDO; | ||
| 6 | import cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO; | 6 | import cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO; |
| 7 | import com.baomidou.mybatisplus.annotation.KeySequence; | 7 | import com.baomidou.mybatisplus.annotation.KeySequence; |
| 8 | import com.baomidou.mybatisplus.annotation.TableField; | 8 | import com.baomidou.mybatisplus.annotation.TableField; |
| 9 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 9 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
| 10 | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | 11 | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
| 11 | import lombok.AllArgsConstructor; | 12 | import lombok.AllArgsConstructor; |
| @@ -29,12 +30,12 @@ public class IotAlertRecordDO extends BaseDO { | @@ -29,12 +30,12 @@ public class IotAlertRecordDO extends BaseDO { | ||
| 29 | /** | 30 | /** |
| 30 | * 记录编号 | 31 | * 记录编号 |
| 31 | */ | 32 | */ |
| 32 | - @TableField | 33 | + @TableId |
| 33 | private Long id; | 34 | private Long id; |
| 34 | /** | 35 | /** |
| 35 | * 告警名称 | 36 | * 告警名称 |
| 36 | * | 37 | * |
| 37 | - * 冗余 {@link IotAlertConfigDO#getName()} | 38 | + * 冗余 {@link IotAlertConfigDO#getId()} |
| 38 | */ | 39 | */ |
| 39 | private Long configId; | 40 | private Long configId; |
| 40 | /** | 41 | /** |
| @@ -42,7 +43,7 @@ public class IotAlertRecordDO extends BaseDO { | @@ -42,7 +43,7 @@ public class IotAlertRecordDO extends BaseDO { | ||
| 42 | * | 43 | * |
| 43 | * 冗余 {@link IotAlertConfigDO#getName()} | 44 | * 冗余 {@link IotAlertConfigDO#getName()} |
| 44 | */ | 45 | */ |
| 45 | - private String name; | 46 | + private String configName; |
| 46 | 47 | ||
| 47 | /** | 48 | /** |
| 48 | * 产品编号 | 49 | * 产品编号 |
| @@ -56,8 +57,6 @@ public class IotAlertRecordDO extends BaseDO { | @@ -56,8 +57,6 @@ public class IotAlertRecordDO extends BaseDO { | ||
| 56 | * 关联 {@link IotDeviceDO#getId()} | 57 | * 关联 {@link IotDeviceDO#getId()} |
| 57 | */ | 58 | */ |
| 58 | private String deviceId; | 59 | private String deviceId; |
| 59 | - | ||
| 60 | - // TODO @芋艿:有没更好的方式 | ||
| 61 | /** | 60 | /** |
| 62 | * 触发的设备消息 | 61 | * 触发的设备消息 |
| 63 | */ | 62 | */ |
| @@ -65,10 +64,7 @@ public class IotAlertRecordDO extends BaseDO { | @@ -65,10 +64,7 @@ public class IotAlertRecordDO extends BaseDO { | ||
| 65 | private IotDeviceMessage deviceMessage; | 64 | private IotDeviceMessage deviceMessage; |
| 66 | 65 | ||
| 67 | /** | 66 | /** |
| 68 | - * 处理状态 | ||
| 69 | - * | ||
| 70 | - * true - 已处理 | ||
| 71 | - * false - 未处理 | 67 | + * 是否处理 |
| 72 | */ | 68 | */ |
| 73 | private Boolean processStatus; | 69 | private Boolean processStatus; |
| 74 | /** | 70 | /** |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/mysql/alert/IotAlertConfigMapper.java
| @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.iot.dal.mysql.alert; | @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.iot.dal.mysql.alert; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | 4 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 5 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | 5 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 6 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigPageReqVO; | 6 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigPageReqVO; |
| 7 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; | 7 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; |
| 8 | import org.apache.ibatis.annotations.Mapper; | 8 | import org.apache.ibatis.annotations.Mapper; |
| 9 | 9 |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/enums/rule/IotRuleSceneActionTypeEnum.java
| 1 | package cn.iocoder.yudao.module.iot.enums.rule; | 1 | package cn.iocoder.yudao.module.iot.enums.rule; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.core.ArrayValuable; | 3 | import cn.iocoder.yudao.framework.common.core.ArrayValuable; |
| 4 | +import cn.iocoder.yudao.module.iot.core.enums.IotDeviceMessageMethodEnum; | ||
| 4 | import lombok.Getter; | 5 | import lombok.Getter; |
| 5 | import lombok.RequiredArgsConstructor; | 6 | import lombok.RequiredArgsConstructor; |
| 6 | 7 | ||
| @@ -15,17 +16,16 @@ import java.util.Arrays; | @@ -15,17 +16,16 @@ import java.util.Arrays; | ||
| 15 | @Getter | 16 | @Getter |
| 16 | public enum IotRuleSceneActionTypeEnum implements ArrayValuable<Integer> { | 17 | public enum IotRuleSceneActionTypeEnum implements ArrayValuable<Integer> { |
| 17 | 18 | ||
| 18 | - // TODO @芋艿:后续“对应”部分,要 @下,等包结构梳理完; | ||
| 19 | /** | 19 | /** |
| 20 | * 设备属性设置 | 20 | * 设备属性设置 |
| 21 | * | 21 | * |
| 22 | - * 对应 IotDeviceMessageMethodEnum.DEVICE_PROPERTY_SET | 22 | + * 对应 {@link IotDeviceMessageMethodEnum#PROPERTY_SET} |
| 23 | */ | 23 | */ |
| 24 | DEVICE_PROPERTY_SET(1), | 24 | DEVICE_PROPERTY_SET(1), |
| 25 | /** | 25 | /** |
| 26 | * 设备服务调用 | 26 | * 设备服务调用 |
| 27 | * | 27 | * |
| 28 | - * 对应 IotDeviceMessageMethodEnum.DEVICE_SERVICE_INVOKE | 28 | + * 对应 {@link IotDeviceMessageMethodEnum#SERVICE_INVOKE} |
| 29 | */ | 29 | */ |
| 30 | DEVICE_SERVICE_INVOKE(2), | 30 | DEVICE_SERVICE_INVOKE(2), |
| 31 | 31 | ||
| @@ -38,8 +38,6 @@ public enum IotRuleSceneActionTypeEnum implements ArrayValuable<Integer> { | @@ -38,8 +38,6 @@ public enum IotRuleSceneActionTypeEnum implements ArrayValuable<Integer> { | ||
| 38 | */ | 38 | */ |
| 39 | ALERT_RECOVER(101), | 39 | ALERT_RECOVER(101), |
| 40 | 40 | ||
| 41 | - @Deprecated | ||
| 42 | - ALERT(2), // 告警执行 | ||
| 43 | ; | 41 | ; |
| 44 | 42 | ||
| 45 | private final Integer type; | 43 | private final Integer type; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/alert/IotAlertConfigService.java
| 1 | package cn.iocoder.yudao.module.iot.service.alert; | 1 | package cn.iocoder.yudao.module.iot.service.alert; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigPageReqVO; | ||
| 5 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigSaveReqVO; | 4 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigPageReqVO; |
| 5 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigSaveReqVO; | ||
| 6 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; | 6 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; |
| 7 | import jakarta.validation.Valid; | 7 | import jakarta.validation.Valid; |
| 8 | 8 |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/alert/IotAlertConfigServiceImpl.java
| @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.iot.service.alert; | @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.iot.service.alert; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 4 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 5 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigPageReqVO; | ||
| 6 | -import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.IotAlertConfigSaveReqVO; | 5 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigPageReqVO; |
| 6 | +import cn.iocoder.yudao.module.iot.controller.admin.alert.vo.config.IotAlertConfigSaveReqVO; | ||
| 7 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; | 7 | import cn.iocoder.yudao.module.iot.dal.dataobject.alert.IotAlertConfigDO; |
| 8 | import cn.iocoder.yudao.module.iot.dal.mysql.alert.IotAlertConfigMapper; | 8 | import cn.iocoder.yudao.module.iot.dal.mysql.alert.IotAlertConfigMapper; |
| 9 | import cn.iocoder.yudao.module.iot.service.rule.scene.IotRuleSceneService; | 9 | import cn.iocoder.yudao.module.iot.service.rule.scene.IotRuleSceneService; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/IotRuleSceneServiceImpl.java
| @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotRuleSceneConditionOperatorEnum; | @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotRuleSceneConditionOperatorEnum; | ||
| 27 | import cn.iocoder.yudao.module.iot.enums.rule.IotRuleSceneTriggerTypeEnum; | 27 | import cn.iocoder.yudao.module.iot.enums.rule.IotRuleSceneTriggerTypeEnum; |
| 28 | import cn.iocoder.yudao.module.iot.framework.job.core.IotSchedulerManager; | 28 | import cn.iocoder.yudao.module.iot.framework.job.core.IotSchedulerManager; |
| 29 | import cn.iocoder.yudao.module.iot.job.rule.IotRuleSceneJob; | 29 | import cn.iocoder.yudao.module.iot.job.rule.IotRuleSceneJob; |
| 30 | -import cn.iocoder.yudao.module.iot.service.rule.scene.action.IotRuleSceneAction; | 30 | +import cn.iocoder.yudao.module.iot.service.rule.scene.action.IotSceneRuleAction; |
| 31 | import jakarta.annotation.Resource; | 31 | import jakarta.annotation.Resource; |
| 32 | import lombok.SneakyThrows; | 32 | import lombok.SneakyThrows; |
| 33 | import lombok.extern.slf4j.Slf4j; | 33 | import lombok.extern.slf4j.Slf4j; |
| @@ -39,15 +39,13 @@ import org.quartz.impl.StdSchedulerFactory; | @@ -39,15 +39,13 @@ import org.quartz.impl.StdSchedulerFactory; | ||
| 39 | import org.springframework.stereotype.Service; | 39 | import org.springframework.stereotype.Service; |
| 40 | import org.springframework.validation.annotation.Validated; | 40 | import org.springframework.validation.annotation.Validated; |
| 41 | 41 | ||
| 42 | +import java.util.Collection; | ||
| 42 | import java.util.HashMap; | 43 | import java.util.HashMap; |
| 43 | import java.util.List; | 44 | import java.util.List; |
| 44 | import java.util.Map; | 45 | import java.util.Map; |
| 45 | -import java.util.Collection; | ||
| 46 | -import java.util.Set; | ||
| 47 | 46 | ||
| 48 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | 47 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 49 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | 48 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 50 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | ||
| 51 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; | 49 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList; |
| 52 | import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.RULE_SCENE_NOT_EXISTS; | 50 | import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.RULE_SCENE_NOT_EXISTS; |
| 53 | 51 | ||
| @@ -65,7 +63,7 @@ public class IotRuleSceneServiceImpl implements IotRuleSceneService { | @@ -65,7 +63,7 @@ public class IotRuleSceneServiceImpl implements IotRuleSceneService { | ||
| 65 | private IotRuleSceneMapper ruleSceneMapper; | 63 | private IotRuleSceneMapper ruleSceneMapper; |
| 66 | 64 | ||
| 67 | @Resource | 65 | @Resource |
| 68 | - private List<IotRuleSceneAction> ruleSceneActions; | 66 | + private List<IotSceneRuleAction> ruleSceneActions; |
| 69 | 67 | ||
| 70 | @Resource(name = "iotSchedulerManager") | 68 | @Resource(name = "iotSchedulerManager") |
| 71 | private IotSchedulerManager schedulerManager; | 69 | private IotSchedulerManager schedulerManager; |
| @@ -437,7 +435,7 @@ public class IotRuleSceneServiceImpl implements IotRuleSceneService { | @@ -437,7 +435,7 @@ public class IotRuleSceneServiceImpl implements IotRuleSceneService { | ||
| 437 | // 2. 遍历规则场景的动作 | 435 | // 2. 遍历规则场景的动作 |
| 438 | ruleScene.getActions().forEach(actionConfig -> { | 436 | ruleScene.getActions().forEach(actionConfig -> { |
| 439 | // 3.1 获取对应的动作 Action 数组 | 437 | // 3.1 获取对应的动作 Action 数组 |
| 440 | - List<IotRuleSceneAction> actions = filterList(ruleSceneActions, | 438 | + List<IotSceneRuleAction> actions = filterList(ruleSceneActions, |
| 441 | action -> action.getType().getType().equals(actionConfig.getType())); | 439 | action -> action.getType().getType().equals(actionConfig.getType())); |
| 442 | if (CollUtil.isEmpty(actions)) { | 440 | if (CollUtil.isEmpty(actions)) { |
| 443 | return; | 441 | return; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/action/IotRuleSceneAlertAction.java renamed to yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/action/IotAlertTriggerRuleSceneAction.java
| @@ -8,21 +8,21 @@ import org.springframework.stereotype.Component; | @@ -8,21 +8,21 @@ import org.springframework.stereotype.Component; | ||
| 8 | import javax.annotation.Nullable; | 8 | import javax.annotation.Nullable; |
| 9 | 9 | ||
| 10 | /** | 10 | /** |
| 11 | - * IoT 告警的 {@link IotRuleSceneAction} 实现类 | 11 | + * IoT 告警触发的 {@link IotSceneRuleAction} 实现类 |
| 12 | * | 12 | * |
| 13 | * @author 芋道源码 | 13 | * @author 芋道源码 |
| 14 | */ | 14 | */ |
| 15 | @Component | 15 | @Component |
| 16 | -public class IotRuleSceneAlertAction implements IotRuleSceneAction { | 16 | +public class IotAlertTriggerRuleSceneAction implements IotSceneRuleAction { |
| 17 | 17 | ||
| 18 | @Override | 18 | @Override |
| 19 | public void execute(@Nullable IotDeviceMessage message, IotRuleSceneDO.ActionConfig config) { | 19 | public void execute(@Nullable IotDeviceMessage message, IotRuleSceneDO.ActionConfig config) { |
| 20 | - // TODO @芋艿:待实现 | 20 | + // TODO @AI: |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | @Override | 23 | @Override |
| 24 | public IotRuleSceneActionTypeEnum getType() { | 24 | public IotRuleSceneActionTypeEnum getType() { |
| 25 | - return IotRuleSceneActionTypeEnum.ALERT; | 25 | + return IotRuleSceneActionTypeEnum.ALERT_TRIGGER; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | } | 28 | } |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/action/IotRuleSceneDeviceControlAction.java renamed to yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/action/IotDeviceControlRuleSceneAction.java
| @@ -12,13 +12,13 @@ import lombok.extern.slf4j.Slf4j; | @@ -12,13 +12,13 @@ import lombok.extern.slf4j.Slf4j; | ||
| 12 | import org.springframework.stereotype.Component; | 12 | import org.springframework.stereotype.Component; |
| 13 | 13 | ||
| 14 | /** | 14 | /** |
| 15 | - * IoT 设备控制的 {@link IotRuleSceneAction} 实现类 | 15 | + * IoT 设备控制的 {@link IotSceneRuleAction} 实现类 |
| 16 | * | 16 | * |
| 17 | * @author 芋道源码 | 17 | * @author 芋道源码 |
| 18 | */ | 18 | */ |
| 19 | @Component | 19 | @Component |
| 20 | @Slf4j | 20 | @Slf4j |
| 21 | -public class IotRuleSceneDeviceControlAction implements IotRuleSceneAction { | 21 | +public class IotDeviceControlRuleSceneAction implements IotSceneRuleAction { |
| 22 | 22 | ||
| 23 | @Resource | 23 | @Resource |
| 24 | private IotDeviceService deviceService; | 24 | private IotDeviceService deviceService; |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/action/IotRuleSceneAction.java renamed to yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/action/IotSceneRuleAction.java
| @@ -7,16 +7,14 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotRuleSceneActionTypeEnum; | @@ -7,16 +7,14 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotRuleSceneActionTypeEnum; | ||
| 7 | import javax.annotation.Nullable; | 7 | import javax.annotation.Nullable; |
| 8 | 8 | ||
| 9 | /** | 9 | /** |
| 10 | - * IoT 规则场景的场景执行器接口 | 10 | + * IoT 场景联动的执行器接口 |
| 11 | * | 11 | * |
| 12 | * @author 芋道源码 | 12 | * @author 芋道源码 |
| 13 | */ | 13 | */ |
| 14 | -public interface IotRuleSceneAction { | ||
| 15 | - | ||
| 16 | - // TODO @芋艿:groovy 或者 javascript 实现数据的转换;可以考虑基于 hutool 的 ScriptUtil 做 | 14 | +public interface IotSceneRuleAction { |
| 17 | 15 | ||
| 18 | /** | 16 | /** |
| 19 | - * 执行场景 | 17 | + * 执行场景联动 |
| 20 | * | 18 | * |
| 21 | * @param message 消息,允许空 | 19 | * @param message 消息,允许空 |
| 22 | * 1. 空的情况:定时触发 | 20 | * 1. 空的情况:定时触发 |