From c535c2a7a4f8446395841564cc15e34113b33f7d Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Fri, 17 Oct 2025 09:53:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(portal):=20=E7=A7=BB=E9=99=A4XML?= =?UTF-8?q?=E4=B8=ADweb=5Fcode=E5=AD=97=E6=AE=B5=E7=9A=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉了HwWebMapper.xml中web_code字段的更新语句 - 注释掉了HwWebMapper1.xml中web_code字段的更新语句 - 在HwWebServiceImpl.java的updateHwWeb方法上添加了@Transactional注解 - 在H1.java的updatewWebServiceImplHwWeb方法上添加了@Transactional注解 --- .../java/com/ruoyi/portal/service/impl/HwWebServiceImpl.java | 2 ++ .../java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java | 2 ++ .../hw-portal/src/main/resources/mapper/portal/HwWebMapper.xml | 2 +- .../hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl.java index d77d7b7..b915db7 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl.java @@ -6,6 +6,7 @@ import org.springframework.stereotype.Service; import com.ruoyi.portal.mapper.HwWebMapper; import com.ruoyi.portal.domain.HwWeb; import com.ruoyi.portal.service.IHwWebService; +import org.springframework.transaction.annotation.Transactional; /** * haiwei官网jsonService业务层处理 @@ -64,6 +65,7 @@ public class HwWebServiceImpl implements IHwWebService * @return 结果 */ @Override + @Transactional( rollbackFor = Exception.class ) public int updateHwWeb(HwWeb hwWeb) { HwWeb codeWeb = new HwWeb(); diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java index 17e5f37..cf7b997 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java @@ -8,6 +8,7 @@ import org.springframework.stereotype.Service; import java.util.List; import com.ruoyi.portal.domain.HwWeb1; import com.ruoyi.portal.domain.HwWeb; +import org.springframework.transaction.annotation.Transactional; /** * haiwei官网jsonService业务层处理 @@ -65,6 +66,7 @@ public class HwWebServiceImpl1 implements IHwWebService1 * @return 结果 */ @Override + @Transactional( rollbackFor = Exception.class ) public int updateHwWeb(HwWeb1 hwWeb1) { HwWeb1 codeWeb = new HwWeb1(); diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper.xml index d3f11e1..d7e794d 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper.xml @@ -49,7 +49,7 @@ web_json = #{webJson}, web_json_string = #{webJsonString}, - web_code = #{webCode}, + where web_code = #{webCode} diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml index b1b907d..2f56147 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml @@ -55,7 +55,7 @@ web_json = #{webJson}, web_json_string = #{webJsonString}, - web_code = #{webCode}, + device_id = #{deviceId}, where web_code = #{webCode}