package com.storlead.sales.task.dispatch;

import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

/**
 * @program: sp-sales-platform
 * @description:
 * @author: chenkq
 * @create: 2024-09-26 10:10
 */
@Slf4j
@Component
@NoArgsConstructor
@DisallowConcurrentExecution
public class AutoMailMarkTagTaskJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
       // emailsService.updateSelectBindCustomerMail();
    }

//    public static void main(String[] args) {
//            //获取当前系统RSA加密的公钥
//            RSA rsa = new RSA();
//            String publicKey = rsa.getPublicKeyBase64();
//
//
//            // 客户端RSA私钥
////            SYSTEM_CACHE.put("LOCAL_PRIVATE_KEY",privateKey);
////            // 客户端RSA公钥
////            SYSTEM_CACHE.put("LOCAL_PUBLIC_KEY",publicKey);
//            //调用ECOLOGY系统接口进行注册
//            String data = HttpRequest.post("https://oa.storlead.com/api/ec/dev/auth/regist")
//                    .header("appid","EEAA5436-7577-4BE0-8C6C-89E9D8880DEV")
//                    .header("cpk",publicKey)
//                    .timeout(10000)
//                    .execute().body();
//            // 打印ECOLOGY响应信息
//            System.out.println("testRegist()："+data);
////            Map<String,Object> datas = JSONUtil.parseObj(data);
////            //ECOLOGY返回的系统公钥
////            SYSTEM_CACHE.put("SERVER_PUBLIC_KEY",StrUtil.nullToEmpty((String)datas.get("spk")));
////            //ECOLOGY返回的系统密钥
////            SYSTEM_CACHE.put("SERVER_SECRET",StrUtil.nullToEmpty((String)datas.get("secrit")));
////            return datas;
//    }
}
