Browse Source

手持表批处理

master
wangwei_123 3 days ago
parent
commit
92f88ad4cd
  1. 10
      cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/BatchDeviceMessageProcessor.java
  2. 2
      cc-admin-master/yudao-module-hand/src/main/resources/mapper/TdengineMapper.xml
  3. 2
      cc-admin-master/yudao-server/src/main/resources/application.yaml

10
cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/BatchDeviceMessageProcessor.java

@ -31,20 +31,10 @@ import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**
* 批量设备消息处理器
* <p>
* 核心优化
* 1. 批量获取基础数据租户信息设备信息报警规则
* 2. 内存中完成所有业务逻辑计算
* 3. 批量执行所有数据库写操作
*/
@Slf4j @Slf4j
@Component @Component
public class BatchDeviceMessageProcessor { public class BatchDeviceMessageProcessor {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
@Resource @Resource
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Resource @Resource

2
cc-admin-master/yudao-module-hand/src/main/resources/mapper/TdengineMapper.xml

@ -168,7 +168,7 @@
AND ts &lt;= #{vo.endTime} AND ts &lt;= #{vo.endTime}
</if> </if>
<if test="vo.deptId != null"> <if test="vo.deptId != null">
AND dept_id; = #{vo.deptId}
AND dept_id = #{vo.deptId}
</if> </if>
<if test="vo.holderName != null and vo.holderName != ''"> <if test="vo.holderName != null and vo.holderName != ''">
<bind name="holderNamePattern" value="'%' + vo.holderName + '%'" /> <bind name="holderNamePattern" value="'%' + vo.holderName + '%'" />

2
cc-admin-master/yudao-server/src/main/resources/application.yaml

@ -2,7 +2,7 @@ spring:
application: application:
name: gas_mobile name: gas_mobile
profiles: profiles:
active: prod
active: local
main: main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。

Loading…
Cancel
Save