bihuisong il y a 3 jours
Parent
commit
28ab4cc154

+ 292 - 289
ruoyi-admin/src/main/java/com/ruoyi/web/controller/visual/VisualController.java

@@ -73,317 +73,320 @@ public class VisualController {
     /**
      * 网站可用性实时监测-数据推送接口
      */
-//    @Scheduled(cron = "0 0/1 * * * ?")
-//    public Result<?> insertBatchWebsiteAvailabilityMonitor() {
-//        log.info("网站可用性实时监测执行,时间:" + System.currentTimeMillis());
+    @Scheduled(cron = "0 0/1 * * * ?")
+    public Result<?> insertBatchWebsiteAvailabilityMonitor() {
+        log.info("网站可用性实时监测执行,时间:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putWebsiteAvailabilityMonitor", token);
+        log.info("网站可用性实时监测数据:{}" , jsonObject);
+        List<WebsiteAvailabilityMonitor> list = JSON.parseArray(jsonObject.get("data").toString(), WebsiteAvailabilityMonitor.class);
+        websiteAvailabilityMonitorService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 本日无法访问网站列表-数据推送接口
+     */
+    @Scheduled(cron = "0 0/1 * * * ?")
+    public Result<?> insertBatchUnableToAccessWebsiteListToday() {
+        log.info("本日无法访问网站列表,时间:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putUnableToAccessWebsiteListToday", token);
+        log.info("本日无法访问网站列表:{}" , jsonObject);
+        List<UnableToAccessWebsiteListToday> list = JSON.parseArray(jsonObject.get("data").toString(), UnableToAccessWebsiteListToday.class);
+        unableToAccessWebsiteListTodayService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府网站十日内点击量-数据推送接口
+     */
+    @Scheduled(cron = "0 0 23 * * ?")
+    public Result<?> insertBatchWebSiteTenDaysHits() {
+        log.info("市政府网站十日内点击量:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putWebSiteTenDaysHits", token);
+        List<WebSiteTenDaysHitsDTO> list = JSON.parseArray(jsonObject.get("data").toString(), WebSiteTenDaysHitsDTO.class);
+        webSiteTenDaysHitsService.insertBatch(list.get(0));
+        return Result.ok();
+    }
+
+    /**
+     * 市政府门户网站访问情况监测-全国各省访问吉林市政府网站排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 23 * * ?")
+    public Result<?> insertBatchVisitingWebsiteRanking() {
+        log.info("全国各省访问吉林市政府网站排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putVisitingWebsiteRanking", token);
+        List<VisitingWebsiteRankingDTO> list = JSON.parseArray(jsonObject.get("data").toString(), VisitingWebsiteRankingDTO.class);
+        visitingWebsiteRankingService.insertBatch(list.get(0));
+        return Result.ok();
+    }
+
+    /**
+     * 市政府门户网站访问情况监测-门户网站栏目浏览量排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 23 * * ?")
+    public Result<?> insertColumnPageView() {
+        log.info("门户网站栏目浏览量排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putColumnPageView", token);
+        List<ColumnPageView> list = JSON.parseArray(jsonObject.get("data").toString(), ColumnPageView.class);
+        columnPageViewService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府门户网站访问情况监测-每日最受欢迎信息排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 23 * * ?")
+    public Result<?> insertPopularInformation() {
+        log.info("每日最受欢迎信息排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putPopularInformation", token);
+        List<PopularInformation> list = JSON.parseArray(jsonObject.get("data").toString(), PopularInformation.class);
+        popularInformationService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府门户网站错别字监测-市政府工作部门-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0 1 * ?")
+    public Result<?> insertMunicipalMisprint() {
+        log.info("市政府门户网站错别字监测-市政府工作部门:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putMunicipalMisprint", token);
+        List<MunicipalMisprint> list = JSON.parseArray(jsonObject.get("data").toString(), MunicipalMisprint.class);
+        municipalMisprintService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府门户网站错别字监测-县(市)区政府-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0 1 * ?")
+    public Result<?> insertCountyAndDistrictMisprint() {
+        log.info("市政府门户网站错别字监测-县(市)区政府:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putCountyAndDistrictMisprint", token);
+        List<CountyAndDistrictMisprint> list = JSON.parseArray(jsonObject.get("data").toString(), CountyAndDistrictMisprint.class);
+        countyAndDistrictMisprintService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府门户网站错误链接监测-市政府门户网站错误链接监测-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0 1 * ?")
+    public Result<?> insertMunicipalErrorLinkMonitor() {
+        log.info("市政府门户网站错误链接监测-市政府门户网站错误链接监测:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putMunicipalErrorLinkMonitor", token);
+        List<MunicipalErrorLinkMonitor> list = JSON.parseArray(jsonObject.get("data").toString(), MunicipalErrorLinkMonitor.class);
+        municipalErrorLinkMonitorService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 网站普查指标监测-网站普查要素-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0 1 * ?")
+    public Result<?> insertCensusElements() {
+        log.info("网站普查指标监测-网站普查要素:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putCensusElements", token);
+        List<CensusElements> list = JSON.parseArray(jsonObject.get("data").toString(), CensusElements.class);
+        censusElementsService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 网站普查指标监测-网站普查单项否信息-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0 1 * ?")
+    public Result<?> insertCensusItemNegativeInformation() {
+        log.info("网站普查指标监测-网站普查单项否信息:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putCensusItemNegativeInformation", token);
+        List<CensusItemNegativeInformation> list = JSON.parseArray(jsonObject.get("data").toString(), CensusItemNegativeInformation.class);
+        censusItemNegativeInformationService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市直部门日更新访问量排名-市直部门日访问量排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/1 * * ?")
+    public Result<?> insertDailyTrafficRanking() {
+        log.info("市直部门日更新访问量排名-市直部门日访问量排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putDailyTrafficRanking", token);
+        List<DailyTrafficRanking> list = JSON.parseArray(jsonObject.get("data").toString(), DailyTrafficRanking.class);
+        dailyTrafficRankingService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市直部门日更新访问量排名-市直部门日更新量排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/1 * * ?")
+    public Result<?> insertDailyUpdateRanking() {
+        log.info("市直部门日更新访问量排名-市直部门日更新量排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putDailyUpdateRanking", token);
+        List<DailyUpdateRanking> list = JSON.parseArray(jsonObject.get("data").toString(), DailyUpdateRanking.class);
+        dailyUpdateRankingService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 县(市)区政府日更新访问量排名-县(市)区政府日访问量排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/1 * * ?")
+    public Result<?> insertCountyDailyTrafficRanking() {
+        log.info("县(市)区政府日更新访问量排名-县(市)区政府日访问量排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putCountyDailyTrafficRanking", token);
+        List<CountyDailyTrafficRanking> list = JSON.parseArray(jsonObject.get("data").toString(), CountyDailyTrafficRanking.class);
+        countyDailyTrafficRankingService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 县(市)区政府日更新访问量排名 - 县(市)区政府日更新量排名-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/1 * * ?")
+    public Result<?> insertCountyDailyUpdateRanking() {
+        log.info("县(市)区政府日更新访问量排名 - 县(市)区政府日更新量排名:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putCountyDailyUpdateRanking", token);
+        List<CountyDailyUpdateRanking> list = JSON.parseArray(jsonObject.get("data").toString(), CountyDailyUpdateRanking.class);
+        countyDailyUpdateRankingService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府网站群互动类栏目更新情况-市直部门-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/2 * * ?")
+    public Result<?> insertMunicipalInteractiveColumns() {
+        log.info("市政府网站群互动类栏目更新情况-市直部门:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putMunicipalInteractiveColumns", token);
+        List<MunicipalInteractiveColumns> list = JSON.parseArray(jsonObject.get("data").toString(), MunicipalInteractiveColumns.class);
+        municipalInteractiveColumnsService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府网站群互动类栏目更新情况-区、开发区-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/2 * * ?")
+    public Result<?> insertAreaInteractiveColumns() {
+        log.info("市政府网站群互动类栏目更新情况-区、开发区:" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putAreaInteractiveColumns", token);
+        List<AreaInteractiveColumns> list = JSON.parseArray(jsonObject.get("data").toString(), AreaInteractiveColumns.class);
+        areaInteractiveColumnsService.insertBatch(list);
+        return Result.ok();
+    }
+
+    /**
+     * 市政府网站群互动类栏目更新情况告警展示-县(市)-数据推送接口
+     */
+    @Scheduled(cron = "0 0 0/2 * * ?")
+    public Result<?> insertCountyInteractiveColumns() {
+        log.info("市政府网站群互动类栏目更新情况告警展示-县(市):" + System.currentTimeMillis());
+        String token = getToken();
+        JSONObject jsonObject = getDatasource("/api/webSite/putCountyInteractiveColumns", token);
+        List<CountyInteractiveColumns> list = JSON.parseArray(jsonObject.get("data").toString(), CountyInteractiveColumns.class);
+        countyInteractiveColumnsService.insertBatch(list);
+        return Result.ok();
+    }
+
+
+
+//    @Scheduled(cron = "0/10 * * * * ?")
+//    public void getRemoteDatasource() {
 //        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putWebsiteAvailabilityMonitor", token);
-//        List<WebsiteAvailabilityMonitor> list = JSON.parseArray(jsonObject.get("data").toString(), WebsiteAvailabilityMonitor.class);
-//        websiteAvailabilityMonitorService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject1 = getDatasource("/api/webSite/putWebsiteAvailabilityMonitor", token);
+//        List<WebsiteAvailabilityMonitor> list1 = JSON.parseArray(jsonObject1.get("data").toString(), WebsiteAvailabilityMonitor.class);
+//        websiteAvailabilityMonitorService.insertBatch(list1);
 //
-//    /**
-//     * 本日无法访问网站列表-数据推送接口
-//     */
-//    @Scheduled(cron = "0 0/5 * * * ?")
-//    public Result<?> insertBatchUnableToAccessWebsiteListToday() {
-//        log.info("本日无法访问网站列表,时间:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putUnableToAccessWebsiteListToday", token);
-//        List<UnableToAccessWebsiteListToday> list = JSON.parseArray(jsonObject.get("data").toString(), UnableToAccessWebsiteListToday.class);
-//        unableToAccessWebsiteListTodayService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject2 = getDatasource("/api/webSite/putUnableToAccessWebsiteListToday", token);
+//        List<UnableToAccessWebsiteListToday> list2 = JSON.parseArray(jsonObject2.get("data").toString(), UnableToAccessWebsiteListToday.class);
+//        unableToAccessWebsiteListTodayService.insertBatch(list2);
 //
-//    /**
-//     * 市政府网站十日内点击量-数据推送接口
-//     */
-//    @Scheduled(cron = "0 0/10 * * * ?")
-//    public Result<?> insertBatchWebSiteTenDaysHits() {
-//        log.info("市政府网站十日内点击量:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putWebSiteTenDaysHits", token);
-//        List<WebSiteTenDaysHitsDTO> list = JSON.parseArray(jsonObject.get("data").toString(), WebSiteTenDaysHitsDTO.class);
-//        webSiteTenDaysHitsService.insertBatch(list.get(0));
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject3 = getDatasource("/api/webSite/putWebSiteTenDaysHits", token);
+//        List<WebSiteTenDaysHitsDTO> list3 = JSON.parseArray(jsonObject3.get("data").toString(), WebSiteTenDaysHitsDTO.class);
+//        webSiteTenDaysHitsService.insertBatch(list3.get(0));
 //
-//    /**
-//     * 市政府门户网站访问情况监测-全国各省访问吉林市政府网站排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0 0/15 * * * ?")
-//    public Result<?> insertBatchVisitingWebsiteRanking() {
-//        log.info("全国各省访问吉林市政府网站排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putVisitingWebsiteRanking", token);
-//        List<VisitingWebsiteRankingDTO> list = JSON.parseArray(jsonObject.get("data").toString(), VisitingWebsiteRankingDTO.class);
-//        visitingWebsiteRankingService.insertBatch(list.get(0));
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject4 = getDatasource("/api/webSite/putVisitingWebsiteRanking", token);
+//        List<VisitingWebsiteRankingDTO> list4 = JSON.parseArray(jsonObject4.get("data").toString(), VisitingWebsiteRankingDTO.class);
+//        visitingWebsiteRankingService.insertBatch(list4.get(0));
 //
-//    /**
-//     * 市政府门户网站访问情况监测-门户网站栏目浏览量排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0 0/20 * * * ?")
-//    public Result<?> insertColumnPageView() {
-//        log.info("门户网站栏目浏览量排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putColumnPageView", token);
-//        List<ColumnPageView> list = JSON.parseArray(jsonObject.get("data").toString(), ColumnPageView.class);
-//        columnPageViewService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject5 = getDatasource("/api/webSite/putColumnPageView", token);
+//        List<ColumnPageView> list5 = JSON.parseArray(jsonObject5.get("data").toString(), ColumnPageView.class);
+//        columnPageViewService.insertBatch(list5);
 //
-//    /**
-//     * 市政府门户网站访问情况监测-每日最受欢迎信息排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0 0/25 * * * ?")
-//    public Result<?> insertPopularInformation() {
-//        log.info("每日最受欢迎信息排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putPopularInformation", token);
-//        List<PopularInformation> list = JSON.parseArray(jsonObject.get("data").toString(), PopularInformation.class);
-//        popularInformationService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject6 = getDatasource("/api/webSite/putPopularInformation", token);
+//        List<PopularInformation> list6 = JSON.parseArray(jsonObject6.get("data").toString(), PopularInformation.class);
+//        popularInformationService.insertBatch(list6);
 //
-//    /**
-//     * 市政府门户网站错别字监测-市政府工作部门-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertMunicipalMisprint() {
-//        log.info("市政府门户网站错别字监测-市政府工作部门:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putMunicipalMisprint", token);
-//        List<MunicipalMisprint> list = JSON.parseArray(jsonObject.get("data").toString(), MunicipalMisprint.class);
-//        municipalMisprintService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject7 = getDatasource("/api/webSite/putMunicipalMisprint", token);
+//        List<MunicipalMisprint> list7 = JSON.parseArray(jsonObject7.get("data").toString(), MunicipalMisprint.class);
+//        municipalMisprintService.insertBatch(list7);
 //
-//    /**
-//     * 市政府门户网站错别字监测-县(市)区政府-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertCountyAndDistrictMisprint() {
-//        log.info("市政府门户网站错别字监测-县(市)区政府:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putCountyAndDistrictMisprint", token);
-//        List<CountyAndDistrictMisprint> list = JSON.parseArray(jsonObject.get("data").toString(), CountyAndDistrictMisprint.class);
-//        countyAndDistrictMisprintService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject8 = getDatasource("/api/webSite/putCountyAndDistrictMisprint", token);
+//        List<CountyAndDistrictMisprint> list8 = JSON.parseArray(jsonObject8.get("data").toString(), CountyAndDistrictMisprint.class);
+//        countyAndDistrictMisprintService.insertBatch(list8);
 //
-//    /**
-//     * 市政府门户网站错误链接监测-市政府门户网站错误链接监测-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertMunicipalErrorLinkMonitor() {
-//        log.info("市政府门户网站错误链接监测-市政府门户网站错误链接监测:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putMunicipalErrorLinkMonitor", token);
-//        List<MunicipalErrorLinkMonitor> list = JSON.parseArray(jsonObject.get("data").toString(), MunicipalErrorLinkMonitor.class);
-//        municipalErrorLinkMonitorService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject9 = getDatasource("/api/webSite/putMunicipalErrorLinkMonitor", token);
+//        List<MunicipalErrorLinkMonitor> list9 = JSON.parseArray(jsonObject9.get("data").toString(), MunicipalErrorLinkMonitor.class);
+//        municipalErrorLinkMonitorService.insertBatch(list9);
 //
-//    /**
-//     * 网站普查指标监测-网站普查要素-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertCensusElements() {
-//        log.info("网站普查指标监测-网站普查要素:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putCensusElements", token);
-//        List<CensusElements> list = JSON.parseArray(jsonObject.get("data").toString(), CensusElements.class);
-//        censusElementsService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject10 = getDatasource("/api/webSite/putCensusElements", token);
+//        List<CensusElements> list10 = JSON.parseArray(jsonObject10.get("data").toString(), CensusElements.class);
+//        censusElementsService.insertBatch(list10);
 //
-//    /**
-//     * 网站普查指标监测-网站普查单项否信息-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertCensusItemNegativeInformation() {
-//        log.info("网站普查指标监测-网站普查单项否信息:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putCensusItemNegativeInformation", token);
-//        List<CensusItemNegativeInformation> list = JSON.parseArray(jsonObject.get("data").toString(), CensusItemNegativeInformation.class);
-//        censusItemNegativeInformationService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject11 = getDatasource("/api/webSite/putCensusItemNegativeInformation", token);
+//        List<CensusItemNegativeInformation> list11 = JSON.parseArray(jsonObject11.get("data").toString(), CensusItemNegativeInformation.class);
+//        censusItemNegativeInformationService.insertBatch(list11);
 //
-//    /**
-//     * 市直部门日更新访问量排名-市直部门日访问量排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertDailyTrafficRanking() {
-//        log.info("市直部门日更新访问量排名-市直部门日访问量排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putDailyTrafficRanking", token);
-//        List<DailyTrafficRanking> list = JSON.parseArray(jsonObject.get("data").toString(), DailyTrafficRanking.class);
-//        dailyTrafficRankingService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject12 = getDatasource("/api/webSite/putDailyTrafficRanking", token);
+//        List<DailyTrafficRanking> list12 = JSON.parseArray(jsonObject12.get("data").toString(), DailyTrafficRanking.class);
+//        dailyTrafficRankingService.insertBatch(list12);
 //
-//    /**
-//     * 市直部门日更新访问量排名-市直部门日更新量排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertDailyUpdateRanking() {
-//        log.info("市直部门日更新访问量排名-市直部门日更新量排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putDailyUpdateRanking", token);
-//        List<DailyUpdateRanking> list = JSON.parseArray(jsonObject.get("data").toString(), DailyUpdateRanking.class);
-//        dailyUpdateRankingService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject13 = getDatasource("/api/webSite/putDailyUpdateRanking", token);
+//        List<DailyUpdateRanking> list13 = JSON.parseArray(jsonObject13.get("data").toString(), DailyUpdateRanking.class);
+//        dailyUpdateRankingService.insertBatch(list13);
 //
-//    /**
-//     * 县(市)区政府日更新访问量排名-县(市)区政府日访问量排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertCountyDailyTrafficRanking() {
-//        log.info("县(市)区政府日更新访问量排名-县(市)区政府日访问量排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putCountyDailyTrafficRanking", token);
-//        List<CountyDailyTrafficRanking> list = JSON.parseArray(jsonObject.get("data").toString(), CountyDailyTrafficRanking.class);
-//        countyDailyTrafficRankingService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject14 = getDatasource("/api/webSite/putCountyDailyTrafficRanking", token);
+//        List<CountyDailyTrafficRanking> list14 = JSON.parseArray(jsonObject14.get("data").toString(), CountyDailyTrafficRanking.class);
+//        countyDailyTrafficRankingService.insertBatch(list14);
 //
-//    /**
-//     * 县(市)区政府日更新访问量排名 - 县(市)区政府日更新量排名-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertCountyDailyUpdateRanking() {
-//        log.info("县(市)区政府日更新访问量排名 - 县(市)区政府日更新量排名:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putCountyDailyUpdateRanking", token);
-//        List<CountyDailyUpdateRanking> list = JSON.parseArray(jsonObject.get("data").toString(), CountyDailyUpdateRanking.class);
-//        countyDailyUpdateRankingService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject15 = getDatasource("/api/webSite/putCountyDailyUpdateRanking", token);
+//        List<CountyDailyUpdateRanking> list15 = JSON.parseArray(jsonObject15.get("data").toString(), CountyDailyUpdateRanking.class);
+//        countyDailyUpdateRankingService.insertBatch(list15);
 //
-//    /**
-//     * 市政府网站群互动类栏目更新情况-市直部门-数据推送接口
-//     */
-//    @Scheduled(cron = "0/5 * * * * ?")
-//    public Result<?> insertMunicipalInteractiveColumns() {
-//        log.info("市政府网站群互动类栏目更新情况-市直部门:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putMunicipalInteractiveColumns", token);
-//        List<MunicipalInteractiveColumns> list = JSON.parseArray(jsonObject.get("data").toString(), MunicipalInteractiveColumns.class);
-//        municipalInteractiveColumnsService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject16 = getDatasource("/api/webSite/putMunicipalInteractiveColumns", token);
+//        List<MunicipalInteractiveColumns> list16 = JSON.parseArray(jsonObject16.get("data").toString(), MunicipalInteractiveColumns.class);
+//        municipalInteractiveColumnsService.insertBatch(list16);
 //
-//    /**
-//     * 市政府网站群互动类栏目更新情况-区、开发区-数据推送接口
-//     */
-//    @Scheduled(cron = "0/10 * * * * ?")
-//    public Result<?> insertAreaInteractiveColumns() {
-//        log.info("市政府网站群互动类栏目更新情况-区、开发区:" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putAreaInteractiveColumns", token);
-//        List<AreaInteractiveColumns> list = JSON.parseArray(jsonObject.get("data").toString(), AreaInteractiveColumns.class);
-//        areaInteractiveColumnsService.insertBatch(list);
-//        return Result.ok();
-//    }
+//        JSONObject jsonObject17 = getDatasource("/api/webSite/putAreaInteractiveColumns", token);
+//        List<AreaInteractiveColumns> list17 = JSON.parseArray(jsonObject17.get("data").toString(), AreaInteractiveColumns.class);
+//        areaInteractiveColumnsService.insertBatch(list17);
 //
-//    /**
-//     * 市政府网站群互动类栏目更新情况告警展示-县(市)-数据推送接口
-//     */
-//    @Scheduled(cron = "0/15 * * * * ?")
-//    public Result<?> insertCountyInteractiveColumns() {
-//        log.info("市政府网站群互动类栏目更新情况告警展示-县(市):" + System.currentTimeMillis());
-//        String token = getToken();
-//        JSONObject jsonObject = getDatasource("/api/webSite/putCountyInteractiveColumns", token);
-//        List<CountyInteractiveColumns> list = JSON.parseArray(jsonObject.get("data").toString(), CountyInteractiveColumns.class);
-//        countyInteractiveColumnsService.insertBatch(list);
-//        return Result.ok();
+//        JSONObject jsonObject18 = getDatasource("/api/webSite/putCountyInteractiveColumns", token);
+//        List<CountyInteractiveColumns> list18 = JSON.parseArray(jsonObject18.get("data").toString(), CountyInteractiveColumns.class);
+//        countyInteractiveColumnsService.insertBatch(list18);
+//        Result.ok();
 //    }
 
 
 
-    @Scheduled(cron = "0 0/10 * * * ?")
-    public void getRemoteDatasource() {
-        String token = getToken();
-        JSONObject jsonObject1 = getDatasource("/api/webSite/putWebsiteAvailabilityMonitor", token);
-        List<WebsiteAvailabilityMonitor> list1 = JSON.parseArray(jsonObject1.get("data").toString(), WebsiteAvailabilityMonitor.class);
-        websiteAvailabilityMonitorService.insertBatch(list1);
-
-        JSONObject jsonObject2 = getDatasource("/api/webSite/putUnableToAccessWebsiteListToday", token);
-        List<UnableToAccessWebsiteListToday> list2 = JSON.parseArray(jsonObject2.get("data").toString(), UnableToAccessWebsiteListToday.class);
-        unableToAccessWebsiteListTodayService.insertBatch(list2);
-
-        JSONObject jsonObject3 = getDatasource("/api/webSite/putWebSiteTenDaysHits", token);
-        List<WebSiteTenDaysHitsDTO> list3 = JSON.parseArray(jsonObject3.get("data").toString(), WebSiteTenDaysHitsDTO.class);
-        webSiteTenDaysHitsService.insertBatch(list3.get(0));
-        JSONObject jsonObject4 = getDatasource("/api/webSite/putVisitingWebsiteRanking", token);
-        List<VisitingWebsiteRankingDTO> list4 = JSON.parseArray(jsonObject4.get("data").toString(), VisitingWebsiteRankingDTO.class);
-        visitingWebsiteRankingService.insertBatch(list4.get(0));
-
-        JSONObject jsonObject5 = getDatasource("/api/webSite/putColumnPageView", token);
-        List<ColumnPageView> list5 = JSON.parseArray(jsonObject5.get("data").toString(), ColumnPageView.class);
-        columnPageViewService.insertBatch(list5);
-
-        JSONObject jsonObject6 = getDatasource("/api/webSite/putPopularInformation", token);
-        List<PopularInformation> list6 = JSON.parseArray(jsonObject6.get("data").toString(), PopularInformation.class);
-        popularInformationService.insertBatch(list6);
-
-        JSONObject jsonObject7 = getDatasource("/api/webSite/putMunicipalMisprint", token);
-        List<MunicipalMisprint> list7 = JSON.parseArray(jsonObject7.get("data").toString(), MunicipalMisprint.class);
-        municipalMisprintService.insertBatch(list7);
-
-        JSONObject jsonObject8 = getDatasource("/api/webSite/putCountyAndDistrictMisprint", token);
-        List<CountyAndDistrictMisprint> list8 = JSON.parseArray(jsonObject8.get("data").toString(), CountyAndDistrictMisprint.class);
-        countyAndDistrictMisprintService.insertBatch(list8);
-
-        JSONObject jsonObject9 = getDatasource("/api/webSite/putMunicipalErrorLinkMonitor", token);
-        List<MunicipalErrorLinkMonitor> list9 = JSON.parseArray(jsonObject9.get("data").toString(), MunicipalErrorLinkMonitor.class);
-        municipalErrorLinkMonitorService.insertBatch(list9);
-
-        JSONObject jsonObject10 = getDatasource("/api/webSite/putCensusElements", token);
-        List<CensusElements> list10 = JSON.parseArray(jsonObject10.get("data").toString(), CensusElements.class);
-        censusElementsService.insertBatch(list10);
-
-        JSONObject jsonObject11 = getDatasource("/api/webSite/putCensusItemNegativeInformation", token);
-        List<CensusItemNegativeInformation> list11 = JSON.parseArray(jsonObject11.get("data").toString(), CensusItemNegativeInformation.class);
-        censusItemNegativeInformationService.insertBatch(list11);
-
-        JSONObject jsonObject12 = getDatasource("/api/webSite/putDailyTrafficRanking", token);
-        List<DailyTrafficRanking> list12 = JSON.parseArray(jsonObject12.get("data").toString(), DailyTrafficRanking.class);
-        dailyTrafficRankingService.insertBatch(list12);
-
-        JSONObject jsonObject13 = getDatasource("/api/webSite/putDailyUpdateRanking", token);
-        List<DailyUpdateRanking> list13 = JSON.parseArray(jsonObject13.get("data").toString(), DailyUpdateRanking.class);
-        dailyUpdateRankingService.insertBatch(list13);
-
-        JSONObject jsonObject14 = getDatasource("/api/webSite/putCountyDailyTrafficRanking", token);
-        List<CountyDailyTrafficRanking> list14 = JSON.parseArray(jsonObject14.get("data").toString(), CountyDailyTrafficRanking.class);
-        countyDailyTrafficRankingService.insertBatch(list14);
-
-        JSONObject jsonObject15 = getDatasource("/api/webSite/putCountyDailyUpdateRanking", token);
-        List<CountyDailyUpdateRanking> list15 = JSON.parseArray(jsonObject15.get("data").toString(), CountyDailyUpdateRanking.class);
-        countyDailyUpdateRankingService.insertBatch(list15);
-
-        JSONObject jsonObject16 = getDatasource("/api/webSite/putMunicipalInteractiveColumns", token);
-        List<MunicipalInteractiveColumns> list16 = JSON.parseArray(jsonObject16.get("data").toString(), MunicipalInteractiveColumns.class);
-        municipalInteractiveColumnsService.insertBatch(list16);
-
-        JSONObject jsonObject17 = getDatasource("/api/webSite/putAreaInteractiveColumns", token);
-        List<AreaInteractiveColumns> list17 = JSON.parseArray(jsonObject17.get("data").toString(), AreaInteractiveColumns.class);
-        areaInteractiveColumnsService.insertBatch(list17);
-
-        JSONObject jsonObject18 = getDatasource("/api/webSite/putCountyInteractiveColumns", token);
-        List<CountyInteractiveColumns> list18 = JSON.parseArray(jsonObject18.get("data").toString(), CountyInteractiveColumns.class);
-        countyInteractiveColumnsService.insertBatch(list18);
-        Result.ok();
-    }
-
-
-
     // 获取 Token
     public String getToken() {
         // 请求 URL

+ 3 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CountyAndDistrictMisprintServiceImpl.java

@@ -13,7 +13,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.util.Comparator;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import static com.ruoyi.common.core.domain.AjaxResult.success;
 
@@ -36,7 +38,7 @@ public class CountyAndDistrictMisprintServiceImpl implements ICountyAndDistrictM
         if (!CollectionUtils.isEmpty(list)) {
             countyAndDistrictMisprintMapper.deleteCountyAndDistrictMisprintAll();
             countyAndDistrictMisprintMapper.insertBatch(list);
-            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_TWELVE,list)));
+            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_TWELVE,list.stream().sorted(Comparator.comparing(CountyAndDistrictMisprint::getMisprintCount)).collect(Collectors.toList()))));
         }
 
     }

+ 8 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MunicipalErrorLinkMonitorServiceImpl.java

@@ -13,7 +13,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.util.Comparator;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import static com.ruoyi.common.core.domain.AjaxResult.success;
 
@@ -36,7 +38,12 @@ public class MunicipalErrorLinkMonitorServiceImpl implements IMunicipalErrorLink
         if (!CollectionUtils.isEmpty(list)) {
             municipalErrorLinkMonitorMapper.deleteMunicipalErrorLinkMonitorAll();
             municipalErrorLinkMonitorMapper.insertBatch(list);
-            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_TEN,list)));
+            List<MunicipalErrorLinkMonitor> collect = list.stream().sorted(
+                    Comparator.comparing(MunicipalErrorLinkMonitor::getErrorCount).reversed()
+                            .thenComparing(MunicipalErrorLinkMonitor::getMaliciousCount).reversed()
+                            .thenComparing(MunicipalErrorLinkMonitor::getGambleCount).reversed()
+            ).collect(Collectors.toList());
+            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_TEN,collect)));
         }
     }
 }

+ 4 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MunicipalMisprintServiceImpl.java

@@ -3,6 +3,7 @@ package com.ruoyi.system.service.impl;
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.system.domain.MunicipalMisprint;
+import com.ruoyi.system.domain.UnableToAccessWebsiteListToday;
 import com.ruoyi.system.domain.WebSiteTenDaysHits;
 import com.ruoyi.system.mapper.MunicipalMisprintMapper;
 import com.ruoyi.system.mapper.WebSiteTenDaysHitsMapper;
@@ -13,7 +14,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.util.Comparator;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import static com.ruoyi.common.core.domain.AjaxResult.success;
 
@@ -36,7 +39,7 @@ public class MunicipalMisprintServiceImpl implements IMunicipalMisprintService {
         if (!CollectionUtils.isEmpty(list)) {
             municipalMisprintMapper.deleteMunicipalMisprintAll();
             municipalMisprintMapper.insertBatch(list);
-            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_ELEVEN,list)));
+            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_ELEVEN,list.stream().sorted(Comparator.comparing(MunicipalMisprint::getMisprintCount)).collect(Collectors.toList()))));
         }
 
     }

+ 4 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnableToAccessWebsiteListTodayImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.DailyUpdateRanking;
 import com.ruoyi.system.domain.UnableToAccessWebsiteListToday;
 import com.ruoyi.system.domain.WebSiteTenDaysHits;
 import com.ruoyi.system.domain.WebsiteAvailabilityMonitor;
@@ -14,9 +15,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 import static com.ruoyi.common.core.domain.AjaxResult.success;
 
@@ -39,7 +42,7 @@ public class UnableToAccessWebsiteListTodayImpl implements IUnableToAccessWebsit
         if (!CollectionUtils.isEmpty(list)) {
             unableToAccessWebsiteListTodayMapper.deleteUnableToAccessWebsiteListTodayAll();
             unableToAccessWebsiteListTodayMapper.insertBatch(list);
-            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_FIFTEEN,list)));
+            WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(success(AjaxResult.Type.TYPE_FIFTEEN,list.stream().sorted(Comparator.comparing(UnableToAccessWebsiteListToday::getAccessCountFail)).collect(Collectors.toList()))));
         }
     }
 }

+ 2 - 0
ruoyi-system/src/main/resources/mapper/system/CountyAndDistrictMisprintMapper.xml

@@ -16,6 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCountyAndDistrictMisprintList" parameterType="CountyAndDistrictMisprint" resultMap="CountyAndDistrictMisprintResult">
         <include refid="selectCountyAndDistrictMisprintVo"/>
+        ORDER BY
+        CONVERT ( misprint_count, SIGNED ) DESC
     </select>
 
 	<delete id="deleteCountyAndDistrictMisprintAll" parameterType="Long">

+ 4 - 0
ruoyi-system/src/main/resources/mapper/system/MunicipalErrorLinkMonitorMapper.xml

@@ -18,6 +18,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectMunicipalErrorLinkMonitorList" parameterType="MunicipalErrorLinkMonitor" resultMap="MunicipalErrorLinkMonitorResult">
         <include refid="selectMunicipalErrorLinkMonitorVo"/>
+        ORDER BY
+        CONVERT ( error_count, SIGNED ) DESC,
+        CONVERT(malicious_count, SIGNED) DESC,
+        CONVERT(gamble_count, SIGNED) DESC
     </select>
 
 	<delete id="deleteMunicipalErrorLinkMonitorAll" parameterType="Long">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/MunicipalMisprintMapper.xml

@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectMunicipalMisprintList" parameterType="MunicipalMisprint" resultMap="MunicipalMisprintResult">
         <include refid="selectMunicipalMisprintVo"/>
+        ORDER BY CONVERT ( misprint_count, SIGNED ) DESC
     </select>
 
 	<delete id="deleteMunicipalMisprintAll" parameterType="Long">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/UnableToAccessWebsiteListTodayMapper.xml

@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectUnableToAccessWebsiteListTodayList" parameterType="UnableToAccessWebsiteListToday" resultMap="UnableToAccessWebsiteListTodayResult">
         <include refid="selectUnableToAccessWebsiteListTodayVo"/>
+        order by CONVERT(access_count_fail, SIGNED) desc
     </select>
 
 	<delete id="deleteUnableToAccessWebsiteListTodayAll" parameterType="Long">