//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.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.util.*;
//
//@Slf4j
//@Component
//@DisallowConcurrentExecution
//public class BusinessTask {
//
//    @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--){
//        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_BIDPUBLICITY&page="+i+"&page_size=20&startTime=1672543421");
//                String data = RSAUtils.decrypt(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;
//    }
//
//}
