xuhy
2025-05-08 b89f1d3745044fec20c9cfe7a94bdb301d2ae645
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java
@@ -1,4 +1,8 @@
package com.ruoyi.jianguan.util;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.api.domain.SysLoginLog;
import com.ruoyi.system.api.domain.SysOperLog;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.other.api.domain.TEnterpriseUserApplication;
import com.ruoyi.other.api.domain.THtml;
@@ -75,6 +79,8 @@
import com.ruoyi.order.api.vo.GovernmentCloudOrderVO;
import com.ruoyi.other.api.feignClient.JianGuanOtherClient;
import com.ruoyi.other.api.vo.GovernmentCloudOtherVO;
import com.ruoyi.system.api.feignClient.JianGuanSystemClient;
import com.ruoyi.system.api.vo.GovernmentCloudSystemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -265,6 +271,8 @@
    private JianGuanOrderClient jianGuanOrderClient;
    @Resource
    private JianGuanOtherClient jianGuanOtherClient;
    @Resource
    private JianGuanSystemClient  jianGuanSystemClient;
    // 每天早上9点执行的定时任务
    @Scheduled(cron = "0 0 9 * * ?")
@@ -465,15 +473,10 @@
        }
        // other服务
        GovernmentCloudOtherVO data3 = jianGuanOtherClient.listAll().getData();
        if (data3 != null) {
            List<Operator> operators = data3.getOperators();
            if (!operators.isEmpty()) {
                try {
                    operatorService.saveBatch(operators);
                }catch (Exception e){
                }
                operatorService.saveOrUpdateBatch(operators);
            }
            List<TActivity> activities = data3.getActivities();
            if (!activities.isEmpty()) {
@@ -505,7 +508,7 @@
            }
            List<THtml> htmls = data3.getHtmls();
            if (!htmls.isEmpty()) {
                htmlService.saveBatch(htmls);
                htmlService.saveOrUpdateBatch(htmls);
            }
            List<TIntegralRule> integralRules = data3.getIntegralRules();
            if (!integralRules.isEmpty()) {
@@ -521,7 +524,7 @@
            }
            List<TSystemConfiguration> systemConfigurations = data3.getSystemConfigurations();
            if (!systemConfigurations.isEmpty()) {
                systemConfigurationService.saveBatch(systemConfigurations);
                systemConfigurationService.saveOrUpdateBatch(systemConfigurations);
            }
            List<TUserTag> userTags = data3.getUserTags();
            if (!userTags.isEmpty()) {
@@ -532,87 +535,24 @@
                vipService.saveBatch(vips);
            }
        }
//        accountingStrategyDetailOrderService
//                accountingStrategyOrderService
//        genTableColumnService
//                genTableService
//        partnerService
//                regionService
//        siteService
//                sysConfigService
//        deptService
//                sysDictDataService
//        sysDictTypeService
//                sysLoginLogService
//        sysMenuService
//                sysNoticeService
//        sysOperLogService
//                sysPermissionService
//        sysPostService
//                sysRoleService
//        sysUserOnlineService
//                sysUserRoleService
//        sysUserService
//                operatorService
//        accountingStrategyDetailService
//                accountingStrategyService
//        activityService
//                advertisingService
//        appCouponService
//                applyChargingPileService
//        appUserAddressService
//                appUserCarService
//        appUserIntegralChangeService
//                appUserService
//        appUserSignService
//                appUserTagService
//        appUserVipDetailService
//                carportService
//        chargingBillService
//                chargingGunService
//        chargingOrderAccountingStrategyService
//                chargingOrderRefundService
//        chargingOrderService
//                chargingPileNotificationService
//        chargingPileService
//                companyService
//        couponService
//                enterpriseUserApplicationService
//        evaluationTagService
//                exchangeOrderService
//        faultMessageService
//                goodsService
//        grantVipService
//                htmlService
//        integralRuleService
//                inviteUserService
//        tInvoiceInformationService
//                invoiceTypeService
//        monitoringEquipmentService
//                noticeService
//        orderAppealService
//                orderEvaluateService
//        orderEvaluateTagService
//                orderInvoiceDetailService
//        orderInvoiceService
//                parkingLotService
//        parkingRecordService
//                partnerSiteService
//        repairService
//                roleSiteService
//        settlementConfirmService
//                shoppingOrderRefundService
//        shoppingOrderService
//                siteMenuService
//        systemConfigurationService
//                userSiteService
//        userTagService
//                vehicleRampService
//        vipOrderRefundService
//                vipOrderService
//        vipService
        GovernmentCloudSystemVO data4 = jianGuanSystemClient.listAll().getData();
        if (data4 != null) {
            List<SysLoginLog> loginLogs = data4.getLoginLogs();
            if (!loginLogs.isEmpty()) {
                sysLoginLogService.saveBatch(loginLogs);
            }
            List<SysOperLog> sysOperLogs = data4.getSysOperLogs();
            if (!sysOperLogs.isEmpty()) {
                sysOperLogService.saveBatch(sysOperLogs);
            }
            List<SysRole> sysRoles = data4.getSysRoles();
            if (!sysRoles.isEmpty()) {
                sysRoleService.saveBatch(sysRoles);
            }
            List<SysUser> sysUsers = data4.getSysUsers();
            if (!sysUsers.isEmpty()) {
                sysUserService.saveBatch(sysUsers);
            }
        }
    }
}