package com.kiisoo.ic.store.service;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author jinchaofan
 * @date 2019/4/28 15:20
 * @company kiisoo
 * @details 获取联系客户统计数据定时任务 job 0 0 1 * * ?
 */
@JobHandler(value="storePromotionData")
@Component
@Slf4j
public class StorePromotionDataJob extends IJobHandler {

    /**
     * 客流定时任务 service
     */
    @Autowired
    private StorePromotionDataService storePromotionDataService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        try {
            log.info("<--获取联系客户统计数据定时任务执行-->");
            storePromotionDataService.syncCustomerBlackList();
            log.info("<--获取联系客户统计数据定时任务结束-->");
        } catch (Exception e) {
            log.error("获取联系客户统计数据任务出错", e);
        }
        return SUCCESS;
    }


}
