Browse Source

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

dev
小可耐 2 months ago committed by GitHub
parent
commit
002da225d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectParameterServiceImpl.java
  2. 3
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectParameterServiceTest.java

1
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectParameterServiceImpl.java

@ -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();

3
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectParameterServiceTest.java

@ -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

Loading…
Cancel
Save