refactor(项目管理): 菜单管理配置联调
This commit is contained in:
parent
c90772bb05
commit
31d073b81d
|
@ -57,7 +57,7 @@ public class ProjectApplicationType {
|
||||||
//用例管理-关联需求
|
//用例管理-关联需求
|
||||||
public enum CASE_RELATED_CONFIG{
|
public enum CASE_RELATED_CONFIG{
|
||||||
CASE_RELATED,
|
CASE_RELATED,
|
||||||
ENABLE,
|
CASE_ENABLE,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class ProjectApplicationType {
|
||||||
//缺陷管理-同步配置项
|
//缺陷管理-同步配置项
|
||||||
public enum ISSUE_SYNC_CONFIG{
|
public enum ISSUE_SYNC_CONFIG{
|
||||||
CRON_EXPRESSION,
|
CRON_EXPRESSION,
|
||||||
ENABLE,
|
SYNC_ENABLE,
|
||||||
MECHANISM,
|
MECHANISM,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,5 @@ public class ProjectApplicationRequest implements Serializable {
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
@Schema(description = "配置类型列表", allowableValues = {"WORKSTATION", "TEST_PLAN", "UI", "PERFORMANCE_TEST", "API", "CASE", "ISSUE"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "配置类型列表", allowableValues = {"WORKSTATION", "TEST_PLAN", "UI", "PERFORMANCE_TEST", "API", "CASE", "ISSUE"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "{project_application.type.not_blank}")
|
|
||||||
private String type;
|
private String type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ public class ProjectApplicationService {
|
||||||
|
|
||||||
private void doSaveOrUpdateSchedule(List<ProjectApplication> issueSyncConfigs, String projectId, String currentUser) {
|
private void doSaveOrUpdateSchedule(List<ProjectApplication> issueSyncConfigs, String projectId, String currentUser) {
|
||||||
List<ProjectApplication> syncCron = issueSyncConfigs.stream().filter(config -> config.getType().equals(ProjectApplicationType.ISSUE.ISSUE_SYNC.name() + "_" + ProjectApplicationType.ISSUE_SYNC_CONFIG.CRON_EXPRESSION.name())).collect(Collectors.toList());
|
List<ProjectApplication> syncCron = issueSyncConfigs.stream().filter(config -> config.getType().equals(ProjectApplicationType.ISSUE.ISSUE_SYNC.name() + "_" + ProjectApplicationType.ISSUE_SYNC_CONFIG.CRON_EXPRESSION.name())).collect(Collectors.toList());
|
||||||
List<ProjectApplication> syncEnable = issueSyncConfigs.stream().filter(config -> config.getType().equals(ProjectApplicationType.ISSUE.ISSUE_SYNC.name() + "_" + ProjectApplicationType.ISSUE_SYNC_CONFIG.ENABLE.name())).collect(Collectors.toList());
|
List<ProjectApplication> syncEnable = issueSyncConfigs.stream().filter(config -> config.getType().equals(ProjectApplicationType.ISSUE.ISSUE_SYNC.name() + "_" + ProjectApplicationType.ISSUE_SYNC_CONFIG.SYNC_ENABLE.name())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(syncCron)) {
|
if (CollectionUtils.isNotEmpty(syncCron)) {
|
||||||
Boolean enable = Boolean.valueOf(syncEnable.get(0).getTypeValue());
|
Boolean enable = Boolean.valueOf(syncEnable.get(0).getTypeValue());
|
||||||
String typeValue = syncCron.get(0).getTypeValue();
|
String typeValue = syncCron.get(0).getTypeValue();
|
||||||
|
|
|
@ -529,7 +529,7 @@ public class ProjectApplicationControllerTests extends BaseTest {
|
||||||
configs.put("jiraIssueTypeId", "10086");
|
configs.put("jiraIssueTypeId", "10086");
|
||||||
configs.put("jiraStoryTypeId", "10010");
|
configs.put("jiraStoryTypeId", "10010");
|
||||||
configs.put("CRON_EXPRESSION", "0 0 0/1 * * ?");
|
configs.put("CRON_EXPRESSION", "0 0 0/1 * * ?");
|
||||||
configs.put("ENABLE", "true");
|
configs.put("SYNC_ENABLE", "true");
|
||||||
configs.put("MECHANISM", "1");
|
configs.put("MECHANISM", "1");
|
||||||
return configs;
|
return configs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue