From 79aceb4de421ccdd05be8642d9a41e88f0c9cfa4 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 20 Jul 2023 16:24:33 +0800 Subject: [PATCH] refactor: change update method --- .../io/metersphere/sdk/service/TestResourcePoolService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java index 15dcf5b068..d958bba2a3 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java @@ -176,14 +176,13 @@ public class TestResourcePoolService { checkApiConfig(testResourceDTO, testResourcePool, testResourcePool.getType()); checkLoadConfig(testResourceDTO, testResourcePool, testResourcePool.getType()); checkUiConfig(testResourceDTO, testResourcePool); - String configuration = JSON.toJSONString(testResourceDTO); TestResourcePoolBlob testResourcePoolBlob = new TestResourcePoolBlob(); testResourcePoolBlob.setId(testResourcePool.getId()); testResourcePoolBlob.setConfiguration(configuration.getBytes()); - testResourcePoolBlobMapper.updateByPrimaryKeyWithBLOBs(testResourcePoolBlob); - testResourcePoolMapper.updateByPrimaryKey(testResourcePool); + testResourcePoolBlobMapper.updateByPrimaryKeySelective(testResourcePoolBlob); + testResourcePoolMapper.updateByPrimaryKeySelective(testResourcePool); } public List listResourcePools(QueryResourcePoolRequest request) {