From 977ccff1b804d52e0e980947266de7980835b1eb Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 4 Dec 2025 19:57:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=96=E5=8A=B1=E5=8F=91=E6=94=BE=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E7=94=A8=E6=88=B7=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../red/circle/order/app/common/InAppPurchaseCommon.java | 9 +++++++++ .../circle/order/app/listener/BuySuccessListener.java | 9 +++++++++ .../gateway/user/UserRunProfileTransportGatewayImpl.java | 1 + .../app/command/bank/UserBankExchangeGoldCmdExe.java | 9 +++++++++ .../app/command/freight/DealerToUserShipCmdExe.java | 9 +++++++++ .../app/command/freight/SendFreightShipCmdExe.java | 8 ++++++++ .../app/command/salary/SalaryExchangeGoldCmdExe.java | 9 +++++++++ 7 files changed, 54 insertions(+) diff --git a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/common/InAppPurchaseCommon.java b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/common/InAppPurchaseCommon.java index 0a85f0aa..e56cf63b 100644 --- a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/common/InAppPurchaseCommon.java +++ b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/common/InAppPurchaseCommon.java @@ -33,6 +33,7 @@ import com.red.circle.other.inner.model.cmd.material.PrizeDescribe; import com.red.circle.other.inner.model.cmd.material.PrizeDescribeRewardCmd; import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule; import com.red.circle.other.inner.model.dto.user.UserOneTimeTaskDTO; +import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.json.JacksonUtils; @@ -45,6 +46,8 @@ import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd; import com.red.circle.wallet.inner.model.enums.FreightBalanceOrigin; import com.red.circle.wallet.inner.model.enums.GoldOrigin; import java.math.BigDecimal; +import java.time.Duration; +import java.time.LocalDateTime; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -185,6 +188,12 @@ public class InAppPurchaseCommon { } private void completedFirstCharge(Long userId, String sysOrigin) { + UserProfileDTO userProfileDTO = userProfileClient.getByUserId(userId).getBody(); + Duration duration = Duration.between(userProfileDTO.getCreateTime().toLocalDateTime(), LocalDateTime.now()); + if (duration.toDays() >= 7) { + return; + } + ResultResponse response = userOneTimeTaskClient.queryCompletedFirstCharge(userId, sysOrigin); if (response.checkSuccess()) { if (response.getBody() == null) { diff --git a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/listener/BuySuccessListener.java b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/listener/BuySuccessListener.java index e97ca890..2b90072a 100644 --- a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/listener/BuySuccessListener.java +++ b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/listener/BuySuccessListener.java @@ -23,6 +23,7 @@ import com.red.circle.other.inner.enums.config.EnumConfigKey; import com.red.circle.other.inner.model.cmd.activity.SendActivityRewardCmd; import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule; import com.red.circle.other.inner.model.dto.user.UserOneTimeTaskDTO; +import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.json.JacksonUtils; import com.red.circle.tool.core.num.ArithmeticUtils; import com.red.circle.tool.core.sequence.IdWorkerUtils; @@ -36,6 +37,8 @@ import com.red.circle.wallet.inner.endpoint.wallet.WalletDiamondClient; import com.red.circle.wallet.inner.model.cmd.DiamondReceiptCmd; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.Duration; +import java.time.LocalDateTime; import java.util.List; import java.util.Objects; import lombok.RequiredArgsConstructor; @@ -104,6 +107,12 @@ public class BuySuccessListener implements MessageListener { } private void completedFirstCharge(Long userId, String sysOrigin) { + UserProfileDTO userProfileDTO = userProfileClient.getByUserId(userId).getBody(); + Duration duration = Duration.between(userProfileDTO.getCreateTime().toLocalDateTime(), LocalDateTime.now()); + if (duration.toDays() >= 7) { + return; + } + ResultResponse response = userOneTimeTaskClient.queryCompletedFirstCharge(userId, sysOrigin); if (response.checkSuccess()) { if (response.getBody() == null) { 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 91598501..933f39eb 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 @@ -49,6 +49,7 @@ import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.date.DateUtils; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.date.ZonedDateTimeAsiaRiyadhUtils; +import com.red.circle.tool.core.date.ZonedId; import com.red.circle.tool.core.json.JacksonUtils; import java.sql.Timestamp; diff --git a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/bank/UserBankExchangeGoldCmdExe.java b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/bank/UserBankExchangeGoldCmdExe.java index 76fc90f6..573df008 100644 --- a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/bank/UserBankExchangeGoldCmdExe.java +++ b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/bank/UserBankExchangeGoldCmdExe.java @@ -22,6 +22,7 @@ import com.red.circle.other.inner.model.cmd.activity.SendActivityRewardCmd; import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule; import com.red.circle.other.inner.model.dto.agency.agency.BillDiamondBalanceDTO; import com.red.circle.other.inner.model.dto.user.UserOneTimeTaskDTO; +import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.num.ArithmeticUtils; import com.red.circle.tool.core.sequence.IdWorkerUtils; @@ -53,6 +54,8 @@ import com.red.circle.wallet.inner.model.enums.GoldWithdrawAcceptAccount; import com.red.circle.wallet.inner.model.enums.UserBankWaterEvent; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.Duration; +import java.time.LocalDateTime; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -175,6 +178,12 @@ public class UserBankExchangeGoldCmdExe { } private void completedFirstCharge(Long userId, String sysOrigin) { + UserProfileDTO userProfileDTO = userProfileClient.getByUserId(userId).getBody(); + Duration duration = Duration.between(userProfileDTO.getCreateTime().toLocalDateTime(), LocalDateTime.now()); + if (duration.toDays() >= 7) { + return; + } + ResultResponse response = userOneTimeTaskClient.queryCompletedFirstCharge(userId, sysOrigin); if (response.checkSuccess()) { if (response.getBody() == null) { diff --git a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/DealerToUserShipCmdExe.java b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/DealerToUserShipCmdExe.java index 18024cad..041af8d0 100644 --- a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/DealerToUserShipCmdExe.java +++ b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/DealerToUserShipCmdExe.java @@ -20,6 +20,7 @@ import com.red.circle.other.inner.enums.activity.PropsActivityTypeEnum; import com.red.circle.other.inner.model.cmd.activity.SendActivityRewardCmd; import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule; import com.red.circle.other.inner.model.dto.user.UserOneTimeTaskDTO; +import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.json.JacksonUtils; import com.red.circle.tool.core.num.ArithmeticUtils; import com.red.circle.tool.core.tuple.PennyAmount; @@ -45,6 +46,8 @@ import com.red.circle.wallet.inner.model.enums.FreightBalanceOrigin; import com.red.circle.wallet.inner.model.enums.GoldOrigin; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.Duration; +import java.time.LocalDateTime; import java.util.List; import java.util.Objects; import lombok.RequiredArgsConstructor; @@ -209,6 +212,12 @@ public class DealerToUserShipCmdExe { } private void completedFirstCharge(Long userId, String sysOrigin) { + UserProfileDTO userProfileDTO = userProfileClient.getByUserId(userId).getBody(); + Duration duration = Duration.between(userProfileDTO.getCreateTime().toLocalDateTime(), LocalDateTime.now()); + if (duration.toDays() >= 7) { + return; + } + ResultResponse response = userOneTimeTaskClient.queryCompletedFirstCharge(userId, sysOrigin); if (response.checkSuccess() && response.getBody() == null) { userOneTimeTaskClient.completedFirstCharge(userId, sysOrigin); diff --git a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java index b6b9022e..cd5ec317 100644 --- a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java +++ b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java @@ -45,6 +45,8 @@ import com.red.circle.wallet.inner.model.enums.FreightBalanceOrigin; import com.red.circle.wallet.inner.model.enums.GoldOrigin; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.Duration; +import java.time.LocalDateTime; import java.util.List; import java.util.Objects; import lombok.RequiredArgsConstructor; @@ -164,6 +166,12 @@ public class SendFreightShipCmdExe { } private void completedFirstCharge(Long userId, String sysOrigin) { + UserProfileDTO userProfileDTO = userProfileClient.getByUserId(userId).getBody(); + Duration duration = Duration.between(userProfileDTO.getCreateTime().toLocalDateTime(), LocalDateTime.now()); + if (duration.toDays() >= 7) { + return; + } + ResultResponse response = userOneTimeTaskClient.queryCompletedFirstCharge(userId, sysOrigin); if (response.checkSuccess()) { if (response.getBody() == null) { diff --git a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/salary/SalaryExchangeGoldCmdExe.java b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/salary/SalaryExchangeGoldCmdExe.java index e6f4dece..05af1005 100644 --- a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/salary/SalaryExchangeGoldCmdExe.java +++ b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/salary/SalaryExchangeGoldCmdExe.java @@ -25,6 +25,7 @@ import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule; import com.red.circle.other.inner.model.dto.agency.agency.BillDiamondBalanceDTO; import com.red.circle.other.inner.model.dto.user.SysExchangeGoldTipDTO; import com.red.circle.other.inner.model.dto.user.UserOneTimeTaskDTO; +import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.num.ArithmeticUtils; import com.red.circle.tool.core.sequence.IdWorkerUtils; @@ -67,6 +68,8 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.Duration; +import java.time.LocalDateTime; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -165,6 +168,12 @@ public class SalaryExchangeGoldCmdExe { } private void completedFirstCharge(Long userId, String sysOrigin) { + UserProfileDTO userProfileDTO = userProfileClient.getByUserId(userId).getBody(); + Duration duration = Duration.between(userProfileDTO.getCreateTime().toLocalDateTime(), LocalDateTime.now()); + if (duration.toDays() >= 7) { + return; + } + ResultResponse response = userOneTimeTaskClient.queryCompletedFirstCharge(userId, sysOrigin); if (response.checkSuccess()) { if (response.getBody() == null) {