package com.chinacreator.process.job;


import com.chinacreator.process.bean.VipBlackBean;
import com.chinacreator.process.service.VipBlackService;
import com.chinacreator.process.util.URLUtil;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.PersistJobDataAfterExecution;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class VipLimitBlackJob {

    @Autowired
    VipBlackService vipBlackService;


    /**
     * 自动添加黑名单
     * @throws Exception
     */
    @Scheduled(cron = "0 0/30 * * * *")
    public void doProcess() throws Exception{

        String cpid="tencent";
        String spid="101";
        List<String> userids=new ArrayList<String>();
        userids.add("18673197465");
        vipBlackService.intoBlack(cpid,spid,userids);

    }


}
