mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: change jobname when export job
This commit is contained in:
parent
d45cb0712c
commit
40192486c5
@ -221,6 +221,7 @@ public class JobServiceImpl implements JobService {
|
|||||||
final JobInfoDO jobInfoDO = jobInfoOpt.get();
|
final JobInfoDO jobInfoDO = jobInfoOpt.get();
|
||||||
final SaveJobInfoRequest saveJobInfoRequest = JobConverter.convertJobInfoDO2SaveJobInfoRequest(jobInfoDO);
|
final SaveJobInfoRequest saveJobInfoRequest = JobConverter.convertJobInfoDO2SaveJobInfoRequest(jobInfoDO);
|
||||||
saveJobInfoRequest.setId(null);
|
saveJobInfoRequest.setId(null);
|
||||||
|
saveJobInfoRequest.setJobName(saveJobInfoRequest.getJobName() + "_EXPORT_" + System.currentTimeMillis());
|
||||||
log.info("[Job-{}] [exportJob] jobInfoDO: {}, saveJobInfoRequest: {}", jobId, JsonUtils.toJSONString(jobInfoDO), JsonUtils.toJSONString(saveJobInfoRequest));
|
log.info("[Job-{}] [exportJob] jobInfoDO: {}, saveJobInfoRequest: {}", jobId, JsonUtils.toJSONString(jobInfoDO), JsonUtils.toJSONString(saveJobInfoRequest));
|
||||||
return saveJobInfoRequest;
|
return saveJobInfoRequest;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package tech.powerjob.server.config;
|
package tech.powerjob.server.config;
|
||||||
|
|
||||||
import io.swagger.v3.oas.models.ExternalDocumentation;
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
|
import io.swagger.v3.oas.models.info.Contact;
|
||||||
import io.swagger.v3.oas.models.info.Info;
|
import io.swagger.v3.oas.models.info.Info;
|
||||||
import io.swagger.v3.oas.models.info.License;
|
import io.swagger.v3.oas.models.info.License;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -32,15 +32,18 @@ public class SwaggerConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI springShopOpenAPI() {
|
public OpenAPI springShopOpenAPI() {
|
||||||
|
final Contact contact = new Contact();
|
||||||
|
contact.setName("Team PowerJob");
|
||||||
|
contact.setUrl("http://www.powerjob.tech");
|
||||||
|
contact.setEmail("tengjiqi@gmail.com");
|
||||||
|
|
||||||
// apiInfo()用来创建该Api的基本信息(这些基本信息会展现在文档页面中
|
// apiInfo()用来创建该Api的基本信息(这些基本信息会展现在文档页面中
|
||||||
return new OpenAPI()
|
return new OpenAPI()
|
||||||
.info(new Info().title("PowerJob")
|
.info(new Info().title("PowerJob")
|
||||||
.description("Distributed scheduling and computing framework.")
|
.description("Distributed scheduling and computing framework.")
|
||||||
.version(serverInfoService.fetchServiceInfo().getVersion())
|
.version(serverInfoService.fetchServiceInfo().getVersion())
|
||||||
.license(new License().name("Apache License 2.0").url("https://github.com/PowerJob/PowerJob/blob/master/LICENSE")))
|
.contact(contact)
|
||||||
.externalDocs(new ExternalDocumentation()
|
.license(new License().name("Apache License 2.0").url("https://github.com/PowerJob/PowerJob/blob/master/LICENSE")));
|
||||||
.description("Distributed scheduling and computing framework.")
|
|
||||||
.url("http://www.powerjob.tech/"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user