package cn.com.ctop.job.kuaishou.handler;

import cn.com.ctop.common.module.utils.Check;
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouAgentAccountListService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


import java.util.List;
@Component
public class KuaiShouJinNiuAccountListJob {
    @Autowired
    private IKuaishouAgentAccountListService kuaishouAgentAccountListService;

    @XxlJob("syncAccounts")
    public void execute() throws Exception {
        List<String> cookies = kuaishouAgentAccountListService.getCookie();
        if (!Check.isNull(cookies)) {
            for (int i = 0; i < cookies.size(); i++) {
                String cookie = cookies.get(i);
                kuaishouAgentAccountListService.kuaishouAgentAccountListService(cookie, 1, 500, null, null);

            }

        }


    }


}
