| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | private JianGuanOrderClient jianGuanOrderClient; |
| | | @Resource |
| | | private JianGuanOtherClient jianGuanOtherClient; |
| | | @Resource |
| | | private JianGuanSystemClient jianGuanSystemClient; |
| | | |
| | | // 每天早上9点执行的定时任务 |
| | | @Scheduled(cron = "0 0 9 * * ?") |
| | |
| | | } |
| | | // 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()) { |
| | |
| | | } |
| | | List<THtml> htmls = data3.getHtmls(); |
| | | if (!htmls.isEmpty()) { |
| | | htmlService.saveBatch(htmls); |
| | | htmlService.saveOrUpdateBatch(htmls); |
| | | } |
| | | List<TIntegralRule> integralRules = data3.getIntegralRules(); |
| | | if (!integralRules.isEmpty()) { |
| | |
| | | } |
| | | List<TSystemConfiguration> systemConfigurations = data3.getSystemConfigurations(); |
| | | if (!systemConfigurations.isEmpty()) { |
| | | systemConfigurationService.saveBatch(systemConfigurations); |
| | | systemConfigurationService.saveOrUpdateBatch(systemConfigurations); |
| | | } |
| | | List<TUserTag> userTags = data3.getUserTags(); |
| | | if (!userTags.isEmpty()) { |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |