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}