feat(biz): 新增动环设备相关实体转换接口及定时任务
- 新增楼宇实体与DTO之间的转换接口LcBuildingEntityConvert - 新增动环设备实体转换接口LcPowerEnvDeviceEntityConvert - 新增动环监控指标实体转换接口LcPowerEnvMonitorMetricEntityConvert - 新增阿里云建筑数据定时任务AlibabaBuildingJob - 新增阿里云设备指标数据定时任务AlibabaDeviceMetricJob
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
package com.jeelowcode.module.biz.convert;
|
||||||
|
|
||||||
|
import com.jeelowcode.module.biz.entity.LcBuildingEntity;
|
||||||
|
import com.jeelowcode.module.biz.dto.PowerEnvBuildingItemDTO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇实体转换接口
|
||||||
|
*
|
||||||
|
* @author lingma
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LcBuildingEntityConvert {
|
||||||
|
|
||||||
|
LcBuildingEntityConvert INSTANCE = Mappers.getMapper(LcBuildingEntityConvert.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 LcBuildingEntity 转换为 PowerEnvBuildingItemDTO
|
||||||
|
*
|
||||||
|
* @param bean 实体对象
|
||||||
|
* @return DTO对象
|
||||||
|
*/
|
||||||
|
PowerEnvBuildingItemDTO convert(LcBuildingEntity bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 PowerEnvBuildingItemDTO 转换为 LcBuildingEntity
|
||||||
|
*
|
||||||
|
* @param bean DTO对象
|
||||||
|
* @return 实体对象
|
||||||
|
*/
|
||||||
|
LcBuildingEntity convert(PowerEnvBuildingItemDTO bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 LcBuildingEntity 列表转换为 PowerEnvBuildingItemDTO 列表
|
||||||
|
*
|
||||||
|
* @param list 实体对象列表
|
||||||
|
* @return DTO对象列表
|
||||||
|
*/
|
||||||
|
List<PowerEnvBuildingItemDTO> convertList(List<LcBuildingEntity> list);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.jeelowcode.module.biz.convert;
|
||||||
|
|
||||||
|
import com.jeelowcode.module.biz.entity.LcPowerEnvDeviceEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动环设备实体转换接口
|
||||||
|
*
|
||||||
|
* @author lingma
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LcPowerEnvDeviceEntityConvert {
|
||||||
|
|
||||||
|
LcPowerEnvDeviceEntityConvert INSTANCE = Mappers.getMapper(LcPowerEnvDeviceEntityConvert.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 LcPowerEnvDeviceEntity 转换为 LcPowerEnvDeviceEntity
|
||||||
|
*
|
||||||
|
* @param bean 实体对象
|
||||||
|
* @return 实体对象
|
||||||
|
*/
|
||||||
|
LcPowerEnvDeviceEntity convert(LcPowerEnvDeviceEntity bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 LcPowerEnvDeviceEntity 列表转换为 LcPowerEnvDeviceEntity 列表
|
||||||
|
*
|
||||||
|
* @param list 实体对象列表
|
||||||
|
* @return 实体对象列表
|
||||||
|
*/
|
||||||
|
List<LcPowerEnvDeviceEntity> convertList(List<LcPowerEnvDeviceEntity> list);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.jeelowcode.module.biz.convert;
|
||||||
|
|
||||||
|
import com.jeelowcode.module.biz.entity.LcPowerEnvMonitorMetricEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动环监控指标实体转换接口
|
||||||
|
*
|
||||||
|
* @author lingma
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LcPowerEnvMonitorMetricEntityConvert {
|
||||||
|
|
||||||
|
LcPowerEnvMonitorMetricEntityConvert INSTANCE = Mappers.getMapper(LcPowerEnvMonitorMetricEntityConvert.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 LcPowerEnvMonitorMetricEntity 转换为 LcPowerEnvMonitorMetricEntity
|
||||||
|
*
|
||||||
|
* @param bean 实体对象
|
||||||
|
* @return 实体对象
|
||||||
|
*/
|
||||||
|
LcPowerEnvMonitorMetricEntity convert(LcPowerEnvMonitorMetricEntity bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 LcPowerEnvMonitorMetricEntity 列表转换为 LcPowerEnvMonitorMetricEntity 列表
|
||||||
|
*
|
||||||
|
* @param list 实体对象列表
|
||||||
|
* @return 实体对象列表
|
||||||
|
*/
|
||||||
|
List<LcPowerEnvMonitorMetricEntity> convertList(List<LcPowerEnvMonitorMetricEntity> list);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.jeelowcode.module.biz.job;
|
||||||
|
|
||||||
|
import com.jeelowcode.tool.framework.quartz.core.handler.JobHandler;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备指标数据定时任务
|
||||||
|
*
|
||||||
|
* @author yangchenjj
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@ConditionalOnProperty(name = "jeelowcode.powerenv.baseurl")
|
||||||
|
public class AlibabaBuildingJob implements JobHandler {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(String param) throws Exception {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.jeelowcode.module.biz.job;
|
||||||
|
|
||||||
|
import com.jeelowcode.tool.framework.quartz.core.handler.JobHandler;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备指标数据定时任务
|
||||||
|
*
|
||||||
|
* @author yangchenjj
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@ConditionalOnProperty(name = "jeelowcode.powerenv.baseurl")
|
||||||
|
public class AlibabaDeviceMetricJob implements JobHandler {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(String param) throws Exception {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user