Commit 6f085347 by huluobin

# update

parent 12076186
package com.bailuntec.job;
import com.bailuntec.infrastructure.mapper.DcJobConfigMapper;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.listener.JobExecutionListenerSupport;
import org.springframework.stereotype.Component;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/20 9:58 上午
*/
@Component
public class EbayJobListener extends JobExecutionListenerSupport {
private final DcJobConfigMapper dcJobConfigMapper;
public EbayJobListener(DcJobConfigMapper dcJobConfigMapper) {
super();
this.dcJobConfigMapper = dcJobConfigMapper;
}
@Override
public void afterJob(JobExecution jobExecution) {
}
@Override
public void beforeJob(JobExecution jobExecution) {
}
}
...@@ -42,7 +42,8 @@ public class JobConfiguration { ...@@ -42,7 +42,8 @@ public class JobConfiguration {
StepBuilderFactory stepBuilderFactory, StepBuilderFactory stepBuilderFactory,
DcBaseCompanyAccountMapper dcBaseCompanyAccountMapper, DcBaseCompanyAccountMapper dcBaseCompanyAccountMapper,
DcJobConfigMapper dcJobConfigMapper, DcJobConfigMapper dcJobConfigMapper,
IDcBaseFinanceEbayService dcBaseFinanceEbayService, OaApi oaApi) { IDcBaseFinanceEbayService dcBaseFinanceEbayService,
OaApi oaApi) {
this.jobBuilderFactory = jobBuilderFactory; this.jobBuilderFactory = jobBuilderFactory;
this.stepBuilderFactory = stepBuilderFactory; this.stepBuilderFactory = stepBuilderFactory;
this.dcBaseCompanyAccountMapper = dcBaseCompanyAccountMapper; this.dcBaseCompanyAccountMapper = dcBaseCompanyAccountMapper;
...@@ -50,7 +51,6 @@ public class JobConfiguration { ...@@ -50,7 +51,6 @@ public class JobConfiguration {
this.oaApi = oaApi; this.oaApi = oaApi;
dcJobConfig = dcJobConfigMapper.selectByName("base-sync-finance-ebay-ad");
} }
@Bean @Bean
...@@ -87,4 +87,11 @@ public class JobConfiguration { ...@@ -87,4 +87,11 @@ public class JobConfiguration {
.build(); .build();
} }
public void setDcJobConfig(DcJobConfig dcJobConfig) {
this.dcJobConfig = dcJobConfig;
}
public DcJobConfig getDcJobConfig() {
return dcJobConfig;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment