|
@@ -604,25 +604,16 @@ public class IotOpeationFillController {
|
|
|
// 3. 批量执行(MyBatis批量操作)
|
|
// 3. 批量执行(MyBatis批量操作)
|
|
|
if (!insertList.isEmpty()) {
|
|
if (!insertList.isEmpty()) {
|
|
|
TenantUtils.execute(1L, () -> {
|
|
TenantUtils.execute(1L, () -> {
|
|
|
- for (IotDeviceRunLogDO logDO:insertList) {
|
|
|
|
|
- System.out.println(logDO);
|
|
|
|
|
- }
|
|
|
|
|
iotOpeationFillService.batchInsertLogs(insertList); // 批量插入
|
|
iotOpeationFillService.batchInsertLogs(insertList); // 批量插入
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
if (!updateList.isEmpty()) {
|
|
if (!updateList.isEmpty()) {
|
|
|
TenantUtils.execute(1L, () -> {
|
|
TenantUtils.execute(1L, () -> {
|
|
|
- for (IotDeviceRunLogDO logDO:updateList) {
|
|
|
|
|
- System.out.println(logDO);
|
|
|
|
|
- }
|
|
|
|
|
iotOpeationFillService.batchUpdateLogs(updateList); // 批量更新普通日志
|
|
iotOpeationFillService.batchUpdateLogs(updateList); // 批量更新普通日志
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
if (!updateSumList.isEmpty()) {
|
|
if (!updateSumList.isEmpty()) {
|
|
|
TenantUtils.execute(1L, () -> {
|
|
TenantUtils.execute(1L, () -> {
|
|
|
- for (IotDeviceRunLogDO logDO:updateSumList) {
|
|
|
|
|
- System.out.println(logDO);
|
|
|
|
|
- }
|
|
|
|
|
iotOpeationFillService.batchUpdateSumLogs(updateSumList); // 批量更新累计日志
|
|
iotOpeationFillService.batchUpdateSumLogs(updateSumList); // 批量更新累计日志
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|