diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java index 2161be70d7..c18cf40044 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java @@ -36,7 +36,7 @@ public class TestResourcePoolController { @CacheNode // 把监控节点缓存起来 @Operation(summary = "系统设置-系统-资源池-更新资源池") @RequiresPermissions(PermissionConstants.SYSTEM_TEST_RESOURCE_POOL_READ_UPDATE) - @Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#request.getId())", msClass = TestResourcePoolService.class) + @Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#request)", msClass = TestResourcePoolService.class) public void updateTestResourcePool(@Validated({Updated.class}) @RequestBody TestResourcePoolRequest request) { TestResourcePoolDTO testResourcePool = new TestResourcePoolDTO(); BeanUtils.copyBean(testResourcePool, request); diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java index 546bd061d4..2720ce75a9 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java @@ -9,10 +9,7 @@ import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.*; -import io.metersphere.system.dto.pool.TestResourceDTO; -import io.metersphere.system.dto.pool.TestResourcePoolDTO; -import io.metersphere.system.dto.pool.TestResourcePoolReturnDTO; -import io.metersphere.system.dto.pool.TestResourceReturnDTO; +import io.metersphere.system.dto.pool.*; import io.metersphere.system.dto.sdk.OptionDTO; import io.metersphere.system.dto.sdk.QueryResourcePoolRequest; import io.metersphere.system.log.constants.OperationLogModule; @@ -236,8 +233,8 @@ public class TestResourcePoolService { return testResourcePoolMapper.selectByPrimaryKey(testResourcePoolId); } - public LogDTO updateLog(String resourcePoolId) { - TestResourcePool pool = testResourcePoolMapper.selectByPrimaryKey(resourcePoolId); + public LogDTO updateLog(TestResourcePoolRequest request) { + TestResourcePool pool = testResourcePoolMapper.selectByPrimaryKey(request.getId()); if (pool != null) { LogDTO dto = new LogDTO( OperationLogConstants.SYSTEM, @@ -246,7 +243,7 @@ public class TestResourcePoolService { pool.getCreateUser(), OperationLogType.UPDATE.name(), OperationLogModule.SETTING_SYSTEM_RESOURCE_POOL, - pool.getName()); + request.getName()); dto.setPath("/update"); dto.setMethod(HttpMethodConstants.POST.name());