[Improvement-16773][Parameter] Create project parameters-Field modify user adds default value (#16775)

This commit is contained in:
小可耐 2024-11-07 14:46:21 +08:00 committed by GitHub
parent 26b1ae9970
commit 002da225d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,7 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
.code(CodeGenerateUtils.genCode())
.projectCode(projectCode)
.userId(loginUser.getId())
.operator(loginUser.getId())
.createTime(now)
.updateTime(now)
.build();

View File

@ -114,6 +114,9 @@ public class ProjectParameterServiceTest {
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key1", "value",
DataType.VARCHAR.name());
assertEquals(Status.SUCCESS.getCode(), result.getCode());
ProjectParameter projectParameter = (ProjectParameter) result.getData();
assertEquals(loginUser.getId(), projectParameter.getOperator());
}
@Test