From 09a26666ec0036c0536ce891de7aef303ea53779 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 26 Dec 2024 12:51:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91IoT=EF=BC=9A=E8=A7=A3=E5=86=B3=20device=20=E5=BB=BA?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8Ctdengine=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=AD=97=E6=AE=B5=E9=83=BD=E6=98=AF=E5=B0=8F?= =?UTF-8?q?=E5=86=99=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E9=80=9A=E8=BF=87?= =?UTF-8?q?=20=5F=20=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/service/device/IotDevicePropertyDataServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/device/IotDevicePropertyDataServiceImpl.java b/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/device/IotDevicePropertyDataServiceImpl.java index 5213decf67..99c04a843b 100644 --- a/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/device/IotDevicePropertyDataServiceImpl.java +++ b/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/device/IotDevicePropertyDataServiceImpl.java @@ -100,7 +100,6 @@ public class IotDevicePropertyDataServiceImpl implements IotDevicePropertyDataSe } } - // TODO 芋艿:建表的时候,表名要小写么? // 2.1 情况一:如果是新增的时候,需要创建表 List newFields = buildTableFieldList(thingModels); if (CollUtil.isEmpty(oldFields)) { @@ -119,7 +118,7 @@ public class IotDevicePropertyDataServiceImpl implements IotDevicePropertyDataSe private List buildTableFieldList(List thingModels) { return convertList(thingModels, thingModel -> { TDengineTableField field = new TDengineTableField( - thingModel.getIdentifier().toLowerCase(), // TODO 芋艿:为什么要转成小写? + StrUtil.toUnderlineCase(thingModel.getIdentifier()), // TDengine 字段默认都是小写 TYPE_MAPPING.get(thingModel.getProperty().getDataType())); if (thingModel.getProperty().getDataType().equals(IotDataSpecsDataTypeEnum.TEXT.getDataType())) { field.setLength(((ThingModelDateOrTextDataSpecs) thingModel.getProperty().getDataSpecs()).getLength());