package org.dromara.job.snailjob;

import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
import com.aizuda.snailjob.client.model.ExecuteResult;
import com.aizuda.snailjob.common.log.SnailJobLog;
import org.dromara.system.domain.SysUser;
import org.dromara.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.configurationprocessor.json.JSONException;
import org.springframework.stereotype.Component;

/**
 * 用户抽取（合肥）
 * @author Luo.J
 */
@Component
@JobExecutor(name = "userExtractionJobExecutor")
public class UserExtractionJobExecutor {

    @Autowired
    private SysUserMapper sysUserMapper;

    public ExecuteResult jobExecute(JobArgs jobArgs) throws JSONException {
        SnailJobLog.LOCAL.info("用户抽取任务参数. JobParams:{}", jobArgs.getJobParams());
//        SnailJobLog.REMOTE.info("用户抽取任务参数. JobParams:{}", jobArgs.getJobParams());


        return ExecuteResult.success("执行成功！");
    }

}
