//package com.trs.project.timer;
//
//import com.alibaba.fastjson.JSONArray;
//import com.alibaba.fastjson.JSONObject;
//
//import com.trs.project.entity.GcBidcandidate;
//import com.trs.project.entity.GcNoticeandfile;
//import com.trs.project.entity.GcProject;
//import com.trs.project.entity.GcTenderproject;
//import com.trs.project.service.*;
//import com.trs.project.util.RSAUtil;
//import com.trs.project.util.RSAUtils;
//import lombok.extern.slf4j.Slf4j;
//import org.quartz.DisallowConcurrentExecution;
//import org.springframework.beans.factory.annotation.Autowired;
//
//import org.springframework.stereotype.Component;
//
//import org.springframework.web.client.RestTemplate;
//
//import java.text.ParseException;
//import java.text.SimpleDateFormat;
//import java.util.*;
//
//@Slf4j
//@Component
//@DisallowConcurrentExecution
//public class BusinessTask2 {
//
//    @Autowired
//    private RestTemplate restTemplate;
//
//    @Autowired
//    private GcBidcandidateService gcBidcandidateService;
//    @Autowired
//    private GcProjectService gcProjectService;
//    @Autowired
//    private GcTenderprojectService gcTenderprojectService;
//    @Autowired
//    private GcNoticeandfileService gcNoticeandfileService;
//
//
//    private Long timeMillis = System.currentTimeMillis();
//
//
//    public void execute() {
//        System.out.println("enterTasks定时任务执行时间："+new Date());
//        timeMillis = System.currentTimeMillis();
//        //for(int i = 5636; i > 1 ; i--){
//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        Date date = null;
//        try {
//            date = format.parse("2023-01-05 01:01:01");
//        } catch (ParseException e) {
//            // TODO 自动生成的 catch 块
//            e.printStackTrace();
//        }
//        long starttime = date.getTime();
//
//        String key = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIXX5mUam7SgTwxlmm1rFjJn+CaMs+TPHXNyEbRj04gQ4HHsA2vAkeGjnSr6Jg3cHkNJaraU1rk+tSPb7lCUxzvI4H3JGwnxeFCsPVthhJBd4lh9UvoR32D/qO4SaP2YpVVkIrE5gEJFcbUFMIV+HcQnbwfkwIqGea2kGtYOhAQTAgMBAAECgYA8TLa6GjDIQekbNrNKVJKdhwXfqEhr73vfRScA1HC6vo/AA4rPAuU2eRYYBLccS20+91aih4/tyXimfTFzEHRprRDipyAZQcVLhGdyE/HBdDZBvzLxPumnNJHpZ6FhS9N0UF4cA8CHFAfGkK4vM/Sfi84//Mo3FjCDCII71CpXEQJBAM8XdHJcvQ2dkxnNtGHjljZdwrReWyBcOTJKEKaGkWT3TWBrA70+4OUmQFdIjjBfy4WX+W9MYB9ifI4AFEV1IhcCQQClc+5W4CVfMZayZ2lOSZXkGZf5gN5BYCTIdBcQ0mjCCj9m7+AamwHKJunzPrAIS1YlhtcmhHMXWCyEU/pqnpdlAkAstBBz+2boAILXiBsPInSziavVCaU8KAxEuc48VEIgfG3ciV1GRcOAU7CB5uyirpsdXIAAsYjyXW0rrgKyN6XDAkEAmNcQfGaRf2+ys1m+ONjXQ6C0+IKoTiI/uIEtcZe9uEp5KWE8V7eLnq/1/IOTYAYgLYhzphxCqXUForRlJysb1QJAL0aFB/OLfA7b19h0As011vZuccYJ0Rnunf4a1k4VjfMCOkFRoZlr0LuOwhGqtXgQ2/NBgL2il7KKkzXdSZidbQ==";
////        long starttime = 1677319239*1000;
//        for(int i = 1; i < 10 ; i++){
//            try{
//                JSONObject jsonObject = httpGetMethod("https://ggzyjy.nmg.gov.cn/adminNmg/api/down.do?platform_code=e64975be&table_name=GC_NOTICEANDFILE&page="+i+"&page_size=20&startTime="+starttime);
////                JSONObject jsonObject = httpGetMethod("https://ggzyjy.nmg.gov.cn/adminNmg/api/down.do?platform_code=e64975be&table_name=GC_NOTICEANDFILE&page=1&page_size=20&startTime=167285161000");
////                String data = RSAUtils.decrypt(jsonObject.getString("data"));
//                String data = RSAUtil.decrypt2(jsonObject.getString("data"));
//                JSONArray jsonArray = JSONArray.parseArray(data);
//                System.out.println(jsonArray);
////                List list = JSONObject.parseArray(jsonArray.toJSONString(), GcNoticeandfile.class);
////                for (int j=0;j<list.size();j++){
////                    GcNoticeandfile GcNoticeandfile = (GcNoticeandfile)list.get(i);
////                    GcNoticeandfile.g
////                }
////                gcNoticeandfileService.saveOrUpdateBatch(list);
//            }catch (Exception e){
//                e.printStackTrace();
//            }
//        }
//    }
//
//
//    //http方法
//    public JSONObject httpGetMethod(String uri){
//        JSONObject response = restTemplate.getForObject(uri,JSONObject.class);
//        return response;
//    }
//
//}
