From 99369493b4e1027063d3c609110e81039b1be14a Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 11 Dec 2025 20:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/user/impl/CpRelationshipServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/CpRelationshipServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/CpRelationshipServiceImpl.java index 2a9cb66a..d9a4e096 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/CpRelationshipServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/CpRelationshipServiceImpl.java @@ -16,6 +16,8 @@ import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.Set; + +import com.red.circle.tool.core.date.TimestampUtils; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -154,8 +156,8 @@ public class CpRelationshipServiceImpl extends .setAmount(BigDecimal.ZERO) .setStatus(CpRelationshipStatus.NORMAL.name()) .setDismissTime(null); - cpUser.setCreateTime(LocalDateUtils.nowTimestamp()); - cpUser.setUpdateTime(LocalDateUtils.nowTimestamp()); + cpUser.setCreateTime(TimestampUtils.now()); + cpUser.setUpdateTime(TimestampUtils.now()); return cpUser; } @@ -181,11 +183,10 @@ public class CpRelationshipServiceImpl extends @Override public void updateToDismissing(Long userId, Long cpUserId) { - Timestamp now = LocalDateUtils.nowTimestamp(); update() .set(CpRelationship::getStatus, CpRelationshipStatus.DISMISSING.name()) - .set(CpRelationship::getDismissTime, now.getTime()) - .set(CpRelationship::getUpdateTime, now) + .set(CpRelationship::getDismissTime, TimestampUtils.now().getTime()) + .set(CpRelationship::getUpdateTime, TimestampUtils.now()) .and(where -> where .nested(w -> w.eq(CpRelationship::getUserId, userId).eq(CpRelationship::getCpUserId, cpUserId)) .or() @@ -197,11 +198,10 @@ public class CpRelationshipServiceImpl extends @Override public void reconcile(Long userId, Long cpUserId) { - Timestamp now = LocalDateUtils.nowTimestamp(); update() .set(CpRelationship::getStatus, CpRelationshipStatus.NORMAL.name()) .set(CpRelationship::getDismissTime, null) - .set(CpRelationship::getUpdateTime, now) + .set(CpRelationship::getUpdateTime, TimestampUtils.now()) .and(where -> where .nested(w -> w.eq(CpRelationship::getUserId, userId).eq(CpRelationship::getCpUserId, cpUserId)) .or()