| | |
| | | log.info("用户优惠券"+appCoupons.size()); |
| | | // 将id 设置为null |
| | | log.info("策略"+appCoupons.size()); |
| | | appCoupons = appCoupons.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appCoupons.size(); i += 700) { |
| | | appCouponService.saveOrUpdateBatch(appCoupons.subList(i, Math.min(i + 700, appCoupons.size()))); |
| | |
| | | List<TAppUser> appUsers = data.getAppUsers(); |
| | | if (!appUsers.isEmpty()) { |
| | | log.info("用户"+appUsers.size()); |
| | | |
| | | appUsers = appUsers.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUsers.size(); i += 700) { |
| | | appUserService.saveOrUpdateBatch(appUsers.subList(i, Math.min(i + 700, appUsers.size()))); |
| | | } |
| | | |
| | | } |
| | | List<TAppUserAddress> appUserAddresses = data.getAppUserAddresses(); |
| | | if (!appUserAddresses.isEmpty()) { |
| | | log.info("用户地址"+appUserAddresses.size()); |
| | | |
| | | appUserAddresses = appUserAddresses.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUserAddresses.size(); i += 700) { |
| | | appUserAddressService.saveOrUpdateBatch(appUserAddresses.subList(i, Math.min(i + 700, appUserAddresses.size()))); |
| | |
| | | List<TAppUserCar> appUserCars = data.getAppUserCars(); |
| | | if (!appUserCars.isEmpty()) { |
| | | log.info("用户车辆"+appUserCars.size()); |
| | | appUserCarService.saveOrUpdateBatch(appUserCars); |
| | | appUserCars = appUserCars.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUserCars.size(); i += 700) { |
| | | appUserCarService.saveOrUpdateBatch(appUserCars.subList(i, Math.min(i + 700, appUserCars.size()))); |
| | |
| | | List<TAppUserIntegralChange> appUserIntegralChanges = data.getAppUserIntegralChanges(); |
| | | if (!appUserIntegralChanges.isEmpty()) { |
| | | log.info("用户积分变动"+appUserIntegralChanges.size()); |
| | | |
| | | appUserIntegralChanges = appUserIntegralChanges.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUserIntegralChanges.size(); i += 700) { |
| | | appUserIntegralChangeService.saveOrUpdateBatch(appUserIntegralChanges.subList(i, Math.min(i + 700, appUserIntegralChanges.size()))); |
| | |
| | | List<TAppUserSign> appUserSigns = data.getAppUserSigns(); |
| | | if (!appUserSigns.isEmpty()) { |
| | | log.info("用户签到"+appUserSigns.size()); |
| | | |
| | | appUserSigns = appUserSigns.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUserSigns.size(); i += 700) { |
| | | appUserSignService.saveOrUpdateBatch(appUserSigns.subList(i, Math.min(i + 700, appUserSigns.size()))); |
| | |
| | | if (!appUserTags.isEmpty()) { |
| | | log.info("用户标签"+appUserTags.size()); |
| | | |
| | | |
| | | appUserTags = appUserTags.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUserTags.size(); i += 700) { |
| | | appUserTagService.saveOrUpdateBatch(appUserTags.subList(i, Math.min(i + 700, appUserTags.size()))); |
| | |
| | | if (!appUserVipDetails.isEmpty()) { |
| | | log.info("用户会员明细"+appUserVipDetails.size()); |
| | | |
| | | |
| | | appUserVipDetails = appUserVipDetails.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < appUserVipDetails.size(); i += 700) { |
| | | appUserVipDetailService.saveOrUpdateBatch(appUserVipDetails.subList(i, Math.min(i + 700, appUserVipDetails.size()))); |
| | |
| | | List<TInviteUser> inviteUsers = data.getInviteUsers(); |
| | | if (!inviteUsers.isEmpty()) { |
| | | log.info("邀请用户"+inviteUsers.size()); |
| | | |
| | | inviteUsers = inviteUsers.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < inviteUsers.size(); i += 700) { |
| | | inviteUserService.saveOrUpdateBatch(inviteUsers.subList(i, Math.min(i + 700, inviteUsers.size()))); |
| | |
| | | List<TInvoiceInformation> invoiceInformations = data.getInvoiceInformations(); |
| | | if (!invoiceInformations.isEmpty()) { |
| | | log.info("开票"+invoiceInformations.size()); |
| | | |
| | | invoiceInformations = invoiceInformations.stream() |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isAfter(startOfDay)) |
| | | .filter(accountingStrategy -> accountingStrategy.getCreateTime().isBefore(endOfDay)) |
| | | .collect(Collectors.toList()); |
| | | // 分批插入数据 每次最多700条 |
| | | for (int i = 0; i < invoiceInformations.size(); i += 700) { |
| | | tInvoiceInformationService.saveOrUpdateBatch(invoiceInformations.subList(i, Math.min(i + 700, invoiceInformations.size()))); |