From 233afd7a59b6e62bde41d331a5d36d7fc24eab08 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 29 Jun 2025 10:45:09 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90IoT=20=E7=89=A9=E8=81=94?= =?UTF-8?q?=E7=BD=91=E3=80=91=E5=95=86=E5=93=81=E6=96=B0=E5=A2=9E=E6=97=B6?= =?UTF-8?q?=EF=BC=8CproductKey=20=E4=B8=8D=E5=9C=A8=E8=B7=A8=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E6=A0=A1=E9=AA=8C=EF=BC=8C=E5=9B=A0=E4=B8=BA=E5=8F=AA?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=BF=9D=E8=AF=81=20productKey=20+=20deviceN?= =?UTF-8?q?ame=20=E8=B7=A8=E7=A7=9F=E6=88=B7=E5=94=AF=E4=B8=80=E5=8D=B3?= =?UTF-8?q?=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/service/product/IotProductServiceImpl.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/product/IotProductServiceImpl.java b/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/product/IotProductServiceImpl.java index fb198c8a3b..f29b4eaf9d 100644 --- a/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/product/IotProductServiceImpl.java +++ b/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/product/IotProductServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; -import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; import cn.iocoder.yudao.module.iot.controller.admin.product.vo.product.IotProductPageReqVO; import cn.iocoder.yudao.module.iot.controller.admin.product.vo.product.IotProductSaveReqVO; import cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO; @@ -47,12 +46,9 @@ public class IotProductServiceImpl implements IotProductService { @Override public Long createProduct(IotProductSaveReqVO createReqVO) { // 1. 校验 ProductKey - TenantUtils.executeIgnore(() -> { - // 为什么忽略租户?避免多个租户之间,productKey 重复,导致 TDengine 设备属性表重复 - if (productMapper.selectByProductKey(createReqVO.getProductKey()) != null) { - throw exception(PRODUCT_KEY_EXISTS); - } - }); + if (productMapper.selectByProductKey(createReqVO.getProductKey()) != null) { + throw exception(PRODUCT_KEY_EXISTS); + } // 2. 插入 IotProductDO product = BeanUtils.toBean(createReqVO, IotProductDO.class)