use of io.jpom.build.BuildExtraModule in project Jpom by dromara.
the class BuildInfoManageController method reRelease.
/**
* 重新发布
*
* @param logId logId
* @return json
*/
@RequestMapping(value = "/build/manage/reRelease", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
@Feature(method = MethodFeature.EXECUTE)
public String reRelease(@ValidatorConfig(@ValidatorItem(value = ValidatorRule.NOT_BLANK, msg = "没有数据")) String logId) {
BuildHistoryLog buildHistoryLog = dbBuildHistoryLogService.getByKey(logId, getRequest());
Objects.requireNonNull(buildHistoryLog, "没有对应构建记录.");
BuildInfoModel item = buildInfoService.getByKey(buildHistoryLog.getBuildDataId());
Objects.requireNonNull(item, "没有对应数据");
String e = buildExecuteService.checkStatus(item.getStatus());
Assert.isNull(e, () -> e);
UserModel userModel = getUser();
BuildExtraModule buildExtraModule = BuildExtraModule.build(buildHistoryLog);
// new BuildExtraModule();
// buildExtraModule.updateValue(buildHistoryLog);
ReleaseManage manage = ReleaseManage.builder().buildExtraModule(buildExtraModule).logId(buildHistoryLog.getId()).userModel(userModel).buildId(buildHistoryLog.getBuildNumberId()).buildExecuteService(buildExecuteService).build();
// ReleaseManage releaseManage = new ReleaseManage(buildHistoryLog, userModel);
// 标记发布中
// releaseManage.updateStatus(BuildStatus.PubIng);
ThreadUtil.execute(manage);
return JsonMessage.getString(200, "重新发布中");
}
Aggregations