Commit 16803847 by 章家宝

feat:代码优化

1 parent a2f21110
package cn.com.glsx.dj.strategy.job;
import cn.com.glsx.dj.strategy.service.CustomerTagProfileSyncService;
import cn.com.glsx.dj.strategy.service.CustomerTagProfileService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
......@@ -17,18 +17,18 @@ import org.springframework.stereotype.Component;
*/
@Slf4j
@Component
@RequiredArgsConstructor
@ElasticJobConf(name = "CustomerTagProfileSyncJob", cron = "0 0 2 * * ?",
description = "客户标签画像全量同步定时任务", overwrite = false)
public class CustomerTagProfileSyncJob implements SimpleJob {
private final CustomerTagProfileSyncService customerTagProfileSyncService;
@Autowired
private CustomerTagProfileService customerTagProfileService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("客户标签画像全量同步定时任务开始执行");
try {
CustomerTagProfileSyncService.SyncResult result = customerTagProfileSyncService.syncCustomerTagProfile();
CustomerTagProfileService.SyncResult result = customerTagProfileService.syncCustomerTagProfile();
log.info("客户标签画像全量同步定时任务执行完成:成功={}, 跳过={}, 失败={}",
result.getSuccessCount(), result.getSkipCount(), result.getErrorCount());
} catch (Exception e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!