From 7126f1a0982d09101895af6c38691f47ff84b59f Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 16 七月 2025 20:21:31 +0800
Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile into dev

---
 ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java |  184 +++++++++++++++------------------------------
 1 files changed, 61 insertions(+), 123 deletions(-)

diff --git a/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java b/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java
index 0832909..ffadd44 100644
--- a/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java
+++ b/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java
@@ -290,70 +290,60 @@
             if (!appCoupons.isEmpty()) {
                 log.info("用户优惠券"+appCoupons.size());
                 // 将id 设置为null
-                appCoupons.forEach(appCoupon -> appCoupon.setId(null));
-                appCouponService.saveBatch(appCoupons);
+                appCouponService.saveOrUpdateBatch(appCoupons);
             }
             List<TAppUser> appUsers = data.getAppUsers();
             if (!appUsers.isEmpty()) {
                 log.info("用户"+appUsers.size());
-                appUsers.forEach(appCoupon -> appCoupon.setId(null));
 
-                appUserService.saveBatch(appUsers);
+                appUserService.saveOrUpdateBatch(appUsers);
             }
             List<TAppUserAddress> appUserAddresses = data.getAppUserAddresses();
             if (!appUserAddresses.isEmpty()) {
                 log.info("用户地址"+appUserAddresses.size());
-                appUserAddresses.forEach(appCoupon -> appCoupon.setId(null));
 
-                appUserAddressService.saveBatch(appUserAddresses);
+                appUserAddressService.saveOrUpdateBatch(appUserAddresses);
             }
             List<TAppUserCar> appUserCars = data.getAppUserCars();
             if (!appUserCars.isEmpty()) {
                 log.info("用户车辆"+appUserCars.size());
-                appUserCars.forEach(appCoupon -> appCoupon.setId(null));
-                appUserCarService.saveBatch(appUserCars);
+                appUserCarService.saveOrUpdateBatch(appUserCars);
             }
             List<TAppUserIntegralChange> appUserIntegralChanges = data.getAppUserIntegralChanges();
             if (!appUserIntegralChanges.isEmpty()) {
                 log.info("用户积分变动"+appUserIntegralChanges.size());
-                appUserIntegralChanges.forEach(appCoupon -> appCoupon.setId(null));
 
-                appUserIntegralChangeService.saveBatch(appUserIntegralChanges);
+                appUserIntegralChangeService.saveOrUpdateBatch(appUserIntegralChanges);
             }
             List<TAppUserSign> appUserSigns = data.getAppUserSigns();
             if (!appUserSigns.isEmpty()) {
                 log.info("用户签到"+appUserSigns.size());
-                appUserSigns.forEach(appCoupon -> appCoupon.setId(null));
 
-                appUserSignService.saveBatch(appUserSigns);
+                appUserSignService.saveOrUpdateBatch(appUserSigns);
             }
             List<TAppUserTag> appUserTags = data.getAppUserTags();
             if (!appUserTags.isEmpty()) {
                 log.info("用户标签"+appUserTags.size());
-                appUserTags.forEach(appCoupon -> appCoupon.setId(null));
 
-                appUserTagService.saveBatch(appUserTags);
+                appUserTagService.saveOrUpdateBatch(appUserTags);
             }
             List<TAppUserVipDetail> appUserVipDetails = data.getAppUserVipDetails();
             if (!appUserVipDetails.isEmpty()) {
                 log.info("用户会员明细"+appUserVipDetails.size());
-                appUserVipDetails.forEach(appCoupon -> appCoupon.setId(null));
 
-                appUserVipDetailService.saveBatch(appUserVipDetails);
+                appUserVipDetailService.saveOrUpdateBatch(appUserVipDetails);
             }
             List<TInviteUser> inviteUsers = data.getInviteUsers();
             if (!inviteUsers.isEmpty()) {
                 log.info("邀请用户"+inviteUsers.size());
-                inviteUsers.forEach(appCoupon -> appCoupon.setId(null));
 
-                inviteUserService.saveBatch(inviteUsers);
+                inviteUserService.saveOrUpdateBatch(inviteUsers);
             }
             List<TInvoiceInformation> invoiceInformations = data.getInvoiceInformations();
             if (!invoiceInformations.isEmpty()) {
                 log.info("开票"+invoiceInformations.size());
-                invoiceInformations.forEach(appCoupon -> appCoupon.setId(null));
 
-                tInvoiceInformationService.saveBatch(invoiceInformations);
+                tInvoiceInformationService.saveOrUpdateBatch(invoiceInformations);
             }
         }
         // chargingPile服务
@@ -364,115 +354,100 @@
             List<Partner> partners = data1.getPartners();
             if (!partners.isEmpty()) {
                 log.info("合作商"+partners.size());
-                partners.forEach(appCoupon -> appCoupon.setId(null));
 
-                partnerService.saveBatch(partners);
+                partnerService.saveOrUpdateBatch(partners);
             }
             List<Site> sites = data1.getSites();
             if (!sites.isEmpty()) {
                 log.info("站点"+sites.size());
-                sites.forEach(appCoupon -> appCoupon.setId(null));
 
-                siteService.saveBatch(sites);
+                siteService.saveOrUpdateBatch(sites);
             }
             List<TAccountingStrategy> accountingStrategies = data1.getAccountingStrategies();
             if (!accountingStrategies.isEmpty()) {
                 log.info("策略"+accountingStrategies.size());
-                accountingStrategies.forEach(appCoupon -> appCoupon.setId(null));
 
-                accountingStrategyService.saveBatch(accountingStrategies);
+                accountingStrategyService.saveOrUpdateBatch(accountingStrategies);
             }
             List<TAccountingStrategyDetail> accountingStrategyDetails = data1.getAccountingStrategyDetails();
             if (!accountingStrategyDetails.isEmpty()) {
                 log.info("策略明细"+accountingStrategyDetails.size());
-                accountingStrategyDetails.forEach(appCoupon -> appCoupon.setId(null));
 
-                accountingStrategyDetailService.saveBatch(accountingStrategyDetails);
+                accountingStrategyDetailService.saveOrUpdateBatch(accountingStrategyDetails);
             }
             List<TApplyChargingPile> applyChargingPiles = data1.getApplyChargingPiles();
             if (!applyChargingPiles.isEmpty()) {
                 log.info("申请充电桩"+applyChargingPiles.size());
-                applyChargingPiles.forEach(appCoupon -> appCoupon.setId(null));
 
-                applyChargingPileService.saveBatch(applyChargingPiles);
+                applyChargingPileService.saveOrUpdateBatch(applyChargingPiles);
             }
             List<TCarport> carports = data1.getCarports();
             if (!carports.isEmpty()) {
                 log.info("停车场"+carports.size());
-                carports.forEach(appCoupon -> appCoupon.setId(null));
 
-                carportService.saveBatch(carports);
+                carportService.saveOrUpdateBatch(carports);
             }
             List<TChargingGun> chargingGuns = data1.getChargingGuns();
             if (!chargingGuns.isEmpty()) {
                 log.info("充电枪"+chargingGuns.size());
-                chargingGuns.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingGunService.saveBatch(chargingGuns);
+                chargingGunService.saveOrUpdateBatch(chargingGuns);
             }
             List<TChargingPile> chargingPiles = data1.getChargingPiles();
             if (!chargingPiles.isEmpty()) {
                 log.info("充电桩"+chargingPiles.size());
-                chargingPiles.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingPileService.saveBatch(chargingPiles);
+                chargingPileService.saveOrUpdateBatch(chargingPiles);
             }
             List<TChargingPileNotification> chargingPileNotifications = data1.getChargingPileNotifications();
             if (!chargingPileNotifications.isEmpty()) {
                 log.info("通知"+chargingPileNotifications.size());
-                chargingPileNotifications.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingPileNotificationService.saveBatch(chargingPileNotifications);
+                chargingPileNotificationService.saveOrUpdateBatch(chargingPileNotifications);
             }
             List<TFaultMessage> faultMessages = data1.getFaultMessages();
             if (!faultMessages.isEmpty()) {
                 log.info("故障"+faultMessages.size());
-                faultMessages.forEach(appCoupon -> appCoupon.setId(null));
 
-                faultMessageService.saveBatch(faultMessages);
+                faultMessageService.saveOrUpdateBatch(faultMessages);
             }
             List<TMonitoringEquipment> monitoringEquipments = data1.getMonitoringEquipments();
             if (!monitoringEquipments.isEmpty()) {
                 log.info("监控设备"+monitoringEquipments.size());
-                monitoringEquipments.forEach(appCoupon -> appCoupon.setId(null));
 
-                monitoringEquipmentService.saveBatch(monitoringEquipments);
+                monitoringEquipmentService.saveOrUpdateBatch(monitoringEquipments);
             }
             List<TParkingLot> parkingLots = data1.getParkingLots();
             if (!parkingLots.isEmpty()) {
                 log.info("停车场"+parkingLots.size());
-                parkingLots.forEach(appCoupon -> appCoupon.setId(null));
 
-                parkingLotService.saveBatch(parkingLots);
+                parkingLotService.saveOrUpdateBatch(parkingLots);
             }
             List<TParkingRecord> parkingRecords = data1.getParkingRecords();
             if (!parkingRecords.isEmpty()) {
                 log.info("停车记录"+parkingRecords.size());
-                parkingRecords.forEach(appCoupon -> appCoupon.setId(null));
 
-                parkingRecordService.saveBatch(parkingRecords);
+                parkingRecordService.saveOrUpdateBatch(parkingRecords);
             }
 //            List<TPartnerSite> partnerSites = data1.getPartnerSites();
 //            if (!partnerSites.isEmpty()) {
-//                partnerSiteService.saveBatch(partnerSites);
+//                partnerSiteService.saveOrUpdateBatch(partnerSites);
 //            }
             List<TRepair> repairs = data1.getRepairs();
             if (!repairs.isEmpty()) {
                 log.info("报修"+repairs.size());
-                repairs.forEach(appCoupon -> appCoupon.setId(null));
 
-                repairService.saveBatch(repairs);
+                repairService.saveOrUpdateBatch(repairs);
             }
 //            List<TSiteMenu> siteMenus = data1.getSiteMenus();
 //            if (!siteMenus.isEmpty()) {
-//                siteMenuService.saveBatch(siteMenus);
+//                siteMenuService.saveOrUpdateBatch(siteMenus);
 //            }
             List<TVehicleRamp> vehicleRamps = data1.getVehicleRamps();
             if (!vehicleRamps.isEmpty()) {
                 log.info("车道"+vehicleRamps.size());
-                vehicleRamps.forEach(appCoupon -> appCoupon.setId(null));
 
-                vehicleRampService.saveBatch(vehicleRamps);
+                vehicleRampService.saveOrUpdateBatch(vehicleRamps);
             }
         }
         //order服务
@@ -482,128 +457,110 @@
             List<AccountingStrategyDetailOrder> accountingStrategyDetailOrders = data2.getAccountingStrategyDetailOrders();
             if (!accountingStrategyDetailOrders.isEmpty()) {
                 log.info("订单明细策略"+accountingStrategyDetailOrders.size());
-                accountingStrategyDetailOrders.forEach(appCoupon -> appCoupon.setId(null));
 
-                accountingStrategyDetailOrderService.saveBatch(accountingStrategyDetailOrders);
+                accountingStrategyDetailOrderService.saveOrUpdateBatch(accountingStrategyDetailOrders);
             }
             List<AccountingStrategyOrder> accountingStrategyOrders = data2.getAccountingStrategyOrders();
             if (!accountingStrategyOrders.isEmpty()) {
                 log.info("订单策略"+accountingStrategyOrders.size());
-                accountingStrategyOrders.forEach(appCoupon -> appCoupon.setId(null));
 
-                accountingStrategyOrderService.saveBatch(accountingStrategyOrders);
+                accountingStrategyOrderService.saveOrUpdateBatch(accountingStrategyOrders);
             }
             List<TChargingBill> chargingBills = data2.getChargingBills();
             if (!chargingBills.isEmpty()) {
                 log.info("账单"+chargingBills.size());
-                chargingBills.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingBillService.saveBatch(chargingBills);
+                chargingBillService.saveOrUpdateBatch(chargingBills);
             }
             List<TChargingOrder> chargingOrders = data2.getChargingOrders();
             if (!chargingOrders.isEmpty()) {
                 log.info("充电订单"+chargingOrders.size());
-                chargingOrders.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingOrderService.saveBatch(chargingOrders);
+                chargingOrderService.saveOrUpdateBatch(chargingOrders);
             }
             List<TChargingOrderAccountingStrategy> chargingOrderAccountingStrategies = data2.getChargingOrderAccountingStrategies();
             if (!chargingOrderAccountingStrategies.isEmpty()) {
                 log.info("充电订单策略"+chargingOrderAccountingStrategies.size());
-                chargingOrderAccountingStrategies.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingOrderAccountingStrategyService.saveBatch(chargingOrderAccountingStrategies);
+                chargingOrderAccountingStrategyService.saveOrUpdateBatch(chargingOrderAccountingStrategies);
             }
             List<TChargingOrderRefund> chargingOrderRefunds = data2.getChargingOrderRefunds();
             if (!chargingOrderRefunds.isEmpty()) {
                 log.info("充电订单退款"+chargingOrderRefunds.size());
-                chargingOrderRefunds.forEach(appCoupon -> appCoupon.setId(null));
 
-                chargingOrderRefundService.saveBatch(chargingOrderRefunds);
+                chargingOrderRefundService.saveOrUpdateBatch(chargingOrderRefunds);
             }
             List<TExchangeOrder> exchangeOrders = data2.getExchangeOrders();
             if (!exchangeOrders.isEmpty()) {
                 log.info("兑换订单"+exchangeOrders.size());
-                exchangeOrders.forEach(appCoupon -> appCoupon.setId(null));
 
-                exchangeOrderService.saveBatch(exchangeOrders);
+                exchangeOrderService.saveOrUpdateBatch(exchangeOrders);
             }
             List<TGrantVip> grantVips = data2.getGrantVips();
             if (!grantVips.isEmpty()) {
                 log.info("赠送vip"+grantVips.size());
-                grantVips.forEach(appCoupon -> appCoupon.setId(null));
 
-                grantVipService.saveBatch(grantVips);
+                grantVipService.saveOrUpdateBatch(grantVips);
             }
             List<TOrderAppeal> orderAppeals = data2.getOrderAppeals();
             if (!orderAppeals.isEmpty()) {
                 log.info("订单申诉"+orderAppeals.size());
-                orderAppeals.forEach(appCoupon -> appCoupon.setId(null));
 
-                orderAppealService.saveBatch(orderAppeals);
+                orderAppealService.saveOrUpdateBatch(orderAppeals);
             }
             List<TOrderEvaluate> orderEvaluates = data2.getOrderEvaluates();
             if (!orderEvaluates.isEmpty()) {
                 log.info("订单评价"+orderEvaluates.size());
-                orderEvaluates.forEach(appCoupon -> appCoupon.setId(null));
 
-                orderEvaluateService.saveBatch(orderEvaluates);
+                orderEvaluateService.saveOrUpdateBatch(orderEvaluates);
             }
             List<TOrderEvaluateTag> orderEvaluateTags = data2.getOrderEvaluateTags();
             if (!orderEvaluateTags.isEmpty()) {
                 log.info("订单评价标签"+orderEvaluateTags.size());
-                orderEvaluateTags.forEach(appCoupon -> appCoupon.setId(null));
 
-                orderEvaluateTagService.saveBatch(orderEvaluateTags);
+                orderEvaluateTagService.saveOrUpdateBatch(orderEvaluateTags);
             }
             List<TOrderInvoice> orderInvoices = data2.getOrderInvoices();
             if (!orderInvoices.isEmpty()) {
                 log.info("订单开票"+orderInvoices.size());
-                orderInvoices.forEach(appCoupon -> appCoupon.setId(null));
 
-                orderInvoiceService.saveBatch(orderInvoices);
+                orderInvoiceService.saveOrUpdateBatch(orderInvoices);
             }
             List<TOrderInvoiceDetail> orderInvoiceDetails = data2.getOrderInvoiceDetails();
             if (!orderInvoiceDetails.isEmpty()) {
                 log.info("订单开票明细"+orderInvoiceDetails.size());
-                orderInvoiceDetails.forEach(appCoupon -> appCoupon.setId(null));
 
-                orderInvoiceDetailService.saveBatch(orderInvoiceDetails);
+                orderInvoiceDetailService.saveOrUpdateBatch(orderInvoiceDetails);
             }
             List<TSettlementConfirm> settlementConfirms = data2.getSettlementConfirms();
             if (!settlementConfirms.isEmpty()) {
                 log.info("账单结算"+settlementConfirms.size());
-                settlementConfirms.forEach(appCoupon -> appCoupon.setId(null));
 
-                settlementConfirmService.saveBatch(settlementConfirms);
+                settlementConfirmService.saveOrUpdateBatch(settlementConfirms);
             }
             List<TShoppingOrder> shoppingOrders = data2.getShoppingOrders();
             if (!shoppingOrders.isEmpty()) {
                 log.info("购物订单"+shoppingOrders.size());
-                shoppingOrders.forEach(appCoupon -> appCoupon.setId(null));
 
-                shoppingOrderService.saveBatch(shoppingOrders);
+                shoppingOrderService.saveOrUpdateBatch(shoppingOrders);
             }
             List<TShoppingOrderRefund> shoppingOrderRefunds = data2.getShoppingOrderRefunds();
             if (!shoppingOrderRefunds.isEmpty()) {
                 log.info("购物订单退款"+shoppingOrderRefunds.size());
-                shoppingOrderRefunds.forEach(appCoupon -> appCoupon.setId(null));
 
-                shoppingOrderRefundService.saveBatch(shoppingOrderRefunds);
+                shoppingOrderRefundService.saveOrUpdateBatch(shoppingOrderRefunds);
             }
             List<TVipOrder> vipOrders = data2.getVipOrders();
             if (!vipOrders.isEmpty()) {
                 log.info("会员订单"+vipOrders.size());
-                vipOrders.forEach(appCoupon -> appCoupon.setId(null));
 
-                vipOrderService.saveBatch(vipOrders);
+                vipOrderService.saveOrUpdateBatch(vipOrders);
             }
             List<TVipOrderRefund> vipOrderRefunds = data2.getVipOrderRefunds();
             if (!vipOrderRefunds.isEmpty()) {
                 log.info("会员订单退款"+vipOrderRefunds);
-                vipOrderRefunds.forEach(appCoupon -> appCoupon.setId(null));
 
-                vipOrderRefundService.saveBatch(vipOrderRefunds);
+                vipOrderRefundService.saveOrUpdateBatch(vipOrderRefunds);
             }
         }
         // other服务
@@ -614,107 +571,92 @@
             List<Operator> operators = data3.getOperators();
             if (!operators.isEmpty()) {
                 log.info("运营商"+operators.size());
-                operators.forEach(appCoupon -> appCoupon.setId(null));
 
                 operatorService.saveOrUpdateBatch(operators);
             }
             List<TActivity> activities = data3.getActivities();
             if (!activities.isEmpty()) {
                 log.info("活动"+activities.size());
-                activities.forEach(appCoupon -> appCoupon.setId(null));
 
-                activityService.saveBatch(activities);
+                activityService.saveOrUpdateBatch(activities);
             }
             List<TAdvertising> advertisings = data3.getAdvertisings();
             if (!advertisings.isEmpty()) {
                 log.info("广告"+advertisings.size());
-                advertisings.forEach(appCoupon -> appCoupon.setId(null));
 
-                advertisingService.saveBatch(advertisings);
+                advertisingService.saveOrUpdateBatch(advertisings);
             }
             List<TCompany> companies = data3.getCompanies();
             if (!companies.isEmpty()) {
                 log.info("公司"+companies.size());
-                companies.forEach(appCoupon -> appCoupon.setId(null));
 
-                companyService.saveBatch(companies);
+                companyService.saveOrUpdateBatch(companies);
             }
             List<TCoupon> coupons = data3.getCoupons();
             if (!coupons.isEmpty()) {
                 log.info("优惠券"+coupons.size());
-                coupons.forEach(appCoupon -> appCoupon.setId(null));
 
-                couponService.saveBatch(coupons);
+                couponService.saveOrUpdateBatch(coupons);
             }
             List<TEnterpriseUserApplication> enterpriseUserApplications = data3.getEnterpriseUserApplications();
             if (!enterpriseUserApplications.isEmpty()) {
                 log.info("公司申请"+enterpriseUserApplications.size());
-                enterpriseUserApplications.forEach(appCoupon -> appCoupon.setId(null));
 
-                enterpriseUserApplicationService.saveBatch(enterpriseUserApplications);
+                enterpriseUserApplicationService.saveOrUpdateBatch(enterpriseUserApplications);
             }
             List<TEvaluationTag> evaluationTags = data3.getEvaluationTags();
             if (!evaluationTags.isEmpty()) {
                 log.info("评价标签"+evaluationTags.size());
-                evaluationTags.forEach(appCoupon -> appCoupon.setId(null));
 
-                evaluationTagService.saveBatch(evaluationTags);
+                evaluationTagService.saveOrUpdateBatch(evaluationTags);
             }
             List<TGoods> goods = data3.getGoods();
             if (!goods.isEmpty()) {
                 log.info("商品"+goods.size());
-                goods.forEach(appCoupon -> appCoupon.setId(null));
 
-                goodsService.saveBatch(goods);
+                goodsService.saveOrUpdateBatch(goods);
             }
             List<THtml> htmls = data3.getHtmls();
             if (!htmls.isEmpty()) {
                 log.info("html"+htmls.size());
-                htmls.forEach(appCoupon -> appCoupon.setId(null));
 
                 htmlService.saveOrUpdateBatch(htmls);
             }
             List<TIntegralRule> integralRules = data3.getIntegralRules();
             if (!integralRules.isEmpty()) {
                 log.info("积分规则"+integralRules.size());
-                integralRules.forEach(appCoupon -> appCoupon.setId(null));
 
-                integralRuleService.saveBatch(integralRules);
+                integralRuleService.saveOrUpdateBatch(integralRules);
             }
             List<TInvoiceType> invoiceTypes = data3.getInvoiceTypes();
             if (!invoiceTypes.isEmpty()) {
                 log.info("开票类型"+invoiceTypes.size());
-                invoiceTypes.forEach(appCoupon -> appCoupon.setId(null));
 
-                invoiceTypeService.saveBatch(invoiceTypes);
+                invoiceTypeService.saveOrUpdateBatch(invoiceTypes);
             }
             List<TNotice> notices = data3.getNotices();
             if (!notices.isEmpty()) {
                 log.info("通知"+notices.size());
-                notices.forEach(appCoupon -> appCoupon.setId(null));
 
-                noticeService.saveBatch(notices);
+                noticeService.saveOrUpdateBatch(notices);
             }
             List<TSystemConfiguration> systemConfigurations = data3.getSystemConfigurations();
             if (!systemConfigurations.isEmpty()) {
                 log.info("系统设置"+systemConfigurations.size());
-                systemConfigurations.forEach(appCoupon -> appCoupon.setId(null));
 
                 systemConfigurationService.saveOrUpdateBatch(systemConfigurations);
             }
             List<TUserTag> userTags = data3.getUserTags();
             if (!userTags.isEmpty()) {
                 log.info("用户标签"+userTags.size());
-                userTags.forEach(appCoupon -> appCoupon.setId(null));
 
-                userTagService.saveBatch(userTags);
+                userTagService.saveOrUpdateBatch(userTags);
             }
             List<TVip> vips = data3.getVips();
             if (!vips.isEmpty()) {
                 log.info("会员"+vips.size());
-                vips.forEach(appCoupon -> appCoupon.setId(null));
 
-                vipService.saveBatch(vips);
+                vipService.saveOrUpdateBatch(vips);
             }
         }
         GovernmentCloudSystemVO data4 = jianGuanSystemClient.listAll().getData();
@@ -724,30 +666,26 @@
             List<SysLoginLog> loginLogs = data4.getLoginLogs();
             if (!loginLogs.isEmpty()) {
                 log.info("登录日志"+loginLogs.size());
-                loginLogs.forEach(appCoupon -> appCoupon.setId(null));
 
-                sysLoginLogService.saveBatch(loginLogs);
+                sysLoginLogService.saveOrUpdateBatch(loginLogs);
             }
             List<SysOperLog> sysOperLogs = data4.getSysOperLogs();
             if (!sysOperLogs.isEmpty()) {
                 log.info("操作日志"+sysOperLogs.size());
-                sysOperLogs.forEach(appCoupon -> appCoupon.setOperIp(null));
 
-                sysOperLogService.saveBatch(sysOperLogs);
+                sysOperLogService.saveOrUpdateBatch(sysOperLogs);
             }
             List<SysRole> sysRoles = data4.getSysRoles();
             if (!sysRoles.isEmpty()) {
                 log.info("角色"+sysRoles.size());
-                sysRoles.forEach(appCoupon -> appCoupon.setRoleId(null));
 
-                sysRoleService.saveBatch(sysRoles);
+                sysRoleService.saveOrUpdateBatch(sysRoles);
             }
             List<SysUser> sysUsers = data4.getSysUsers();
             if (!sysUsers.isEmpty()) {
                 log.info("系统用户"+sysUsers.size());
-                sysUsers.forEach(appCoupon -> appCoupon.setUserId(null));
 
-                sysUserService.saveBatch(sysUsers);
+                sysUserService.saveOrUpdateBatch(sysUsers);
             }
         }
     }

--
Gitblit v1.7.1