风机页面遥控接口

This commit is contained in:
huguanghan 2024-10-24 18:32:00 +08:00
parent c8b1a13853
commit 6551d37d6f

View File

@ -418,33 +418,33 @@ public class SysIotModelServiceImpl implements SysIotModelService {
} }
if (CollectionUtils.isNotEmpty(sysIotModelFieldList)) { if (CollectionUtils.isNotEmpty(sysIotModelFieldList)) {
sysIotModelFieldMapper.insertBatch(sysIotModelFieldList); sysIotModelFieldMapper.insertBatch(sysIotModelFieldList);
ListUtil.page(sysIotModelFieldList, COMMIT_COUNT, create -> { // ListUtil.page(sysIotModelFieldList, COMMIT_COUNT, create -> {
for (SysIotModelField item : create){ // for (SysIotModelField item : create){
createTdStableOrColumn(item); // createTdStableOrColumn(item);
} // }
}); // });
} }
if (CollectionUtils.isNotEmpty(updateSysIotModelFieldList)) { if (CollectionUtils.isNotEmpty(updateSysIotModelFieldList)) {
ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, update -> { // ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, update -> {
for (SysIotModelField item : update){ // for (SysIotModelField item : update){
SysIotModelField oldSysIotField = sysIotModelFieldMapper.selectById(item.getId()); // SysIotModelField oldSysIotField = sysIotModelFieldMapper.selectById(item.getId());
if (oldSysIotField != null){ // if (oldSysIotField != null){
if (!oldSysIotField.getAttributeCode().equals(item.getAttributeCode()) && oldSysIotField.getDataType().equals(item.getDataType()) && Objects.equals(oldSysIotField.getHighSpeed(), item.getHighSpeed())){ // if (!oldSysIotField.getAttributeCode().equals(item.getAttributeCode()) && oldSysIotField.getDataType().equals(item.getDataType()) && Objects.equals(oldSysIotField.getHighSpeed(), item.getHighSpeed())){
//更新td表结构 // //更新td表结构
updateTDStableOrColumn(item,oldSysIotField); // updateTDStableOrColumn(item,oldSysIotField);
} // }
} // }
} // }
}); // });
sysIotModelFieldMapper.updateBatchById(updateSysIotModelFieldList); sysIotModelFieldMapper.updateBatchById(updateSysIotModelFieldList);
} }
if (CollectionUtils.isNotEmpty(delSysIotModelFieldList)) { if (CollectionUtils.isNotEmpty(delSysIotModelFieldList)) {
ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, delete -> { // ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, delete -> {
for (SysIotModelField item : delete){ // for (SysIotModelField item : delete){
deleteTDStableOrColumn(item); // deleteTDStableOrColumn(item);
} // }
}); // });
sysIotModelFieldMapper.deleteBatchIds(delSysIotModelFieldList); sysIotModelFieldMapper.deleteBatchIds(delSysIotModelFieldList);
} }
} }