From 608ba3111e07370d02770cbbb49231917e609534 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 6 Mar 2026 17:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=98=AF=E5=90=A6=E9=A6=96?= =?UTF-8?q?=E5=85=85=E6=A0=87=E8=AF=86=E6=94=B9=E4=B8=BA7=E5=A4=A9?= =?UTF-8?q?=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserRunProfileTransportGatewayImpl.java | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java index 141df3b8..63154d31 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java @@ -310,25 +310,24 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo } private void fillUserFirstRecharge(UserRunProfile newUserRunProfile) { - LocalDateTime createTime = newUserRunProfile.getCreateTime().toLocalDateTime(); + List allInvites = userInviteUserDAO.selectList( + new LambdaQueryWrapper() + .eq(UserInviteUser::getInviteUserId, newUserRunProfile.getId()) + .orderByDesc(UserInviteUser::getCreateTime) + ); + if (allInvites == null || allInvites.isEmpty()) { + return; + } + + UserInviteUser userInviteUser = allInvites.get(0); + + LocalDateTime createTime = userInviteUser.getCreateTime().toLocalDateTime(); Duration duration = Duration.between(createTime, LocalDateTime.now()); if (duration.toDays() < 7) { - List allInvites = userInviteUserDAO.selectList( - new LambdaQueryWrapper() - .eq(UserInviteUser::getInviteUserId, newUserRunProfile.getId()) - .orderByDesc(UserInviteUser::getCreateTime) - ); - if (allInvites == null || allInvites.isEmpty()) { - return; - } - - UserInviteUser userInviteUser = allInvites.get(0); - if (userInviteUser != null) { - newUserRunProfile.setFirstRecharge(true); - newUserRunProfile.setFirstRechargeEndTime(ZonedDateTimeUtils.toTimestampDefault(createTime.plusDays(7))); - } - + newUserRunProfile.setFirstRecharge(true); + newUserRunProfile.setFirstRechargeEndTime(ZonedDateTimeUtils.toTimestampDefault(createTime.plusDays(7))); } + } private Map> mapUserUseBadgeEntity(String sysOrigin,