diff --git a/rc-service/rc-service-console/console-application/src/main/java/com/red/circle/console/app/service/app/user/UserWalletServiceImpl.java b/rc-service/rc-service-console/console-application/src/main/java/com/red/circle/console/app/service/app/user/UserWalletServiceImpl.java index 55ce0cc3..396c7fe8 100644 --- a/rc-service/rc-service-console/console-application/src/main/java/com/red/circle/console/app/service/app/user/UserWalletServiceImpl.java +++ b/rc-service/rc-service-console/console-application/src/main/java/com/red/circle/console/app/service/app/user/UserWalletServiceImpl.java @@ -16,6 +16,7 @@ import com.red.circle.order.inner.endpoint.UserRechargeCountClient; import com.red.circle.order.inner.model.enums.MonthlyRechargeType; import com.red.circle.other.inner.endpoint.activity.CumulativeRechargeClient; import com.red.circle.other.inner.endpoint.sys.AnchorSalaryExchangeGoldClient; +import com.red.circle.other.inner.endpoint.user.user.UserLevelClient; import com.red.circle.other.inner.model.cmd.sys.SysAnchorSalaryExchangeGoldCmd; import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.date.TimestampUtils; @@ -60,6 +61,7 @@ public class UserWalletServiceImpl implements UserWalletService { private final UserSvipClient userSvipClient; private final WalletGoldClient walletGoldClient; private final UserProfileClient userProfileClient; + private final UserLevelClient userLevelClient; private final WalletAppConvertor walletAppConvertor; private final WalletDiamondClient walletDiamondClient; private final UserRechargeCountClient userRechargeCountClient; @@ -213,6 +215,9 @@ public class UserWalletServiceImpl implements UserWalletService { // SVip积分累计. userSvipClient.incrIntegral(param.getUserId(), param.getQuantity().longValue()); + } else if (param.getType() != null && param.getType() == 4) { + // 充值类型计入财富榜 + userLevelClient.incrWealthExp(userProfile.getId(), param.getQuantity()); } GoldOrigin candyOriginEnum = diff --git a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/command/pay/app/execute/AppInAppPurchaseCmdExe.java b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/command/pay/app/execute/AppInAppPurchaseCmdExe.java index 8bd4ebeb..54f1ef9c 100644 --- a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/command/pay/app/execute/AppInAppPurchaseCmdExe.java +++ b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/command/pay/app/execute/AppInAppPurchaseCmdExe.java @@ -32,6 +32,7 @@ import com.red.circle.order.inner.model.enums.MonthlyRechargeType; import com.red.circle.order.inner.model.enums.inapp.InAppPurchaseReceiptType; import com.red.circle.order.inner.model.enums.inapp.InAppPurchaseStatus; import com.red.circle.other.inner.endpoint.activity.AppRankCountClient; +import com.red.circle.other.inner.endpoint.user.user.UserLevelClient; import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.regex.RegexConstant; @@ -40,6 +41,8 @@ import com.red.circle.tool.core.text.StringPool; import com.red.circle.tool.core.text.StringUtils; import com.red.circle.other.inner.endpoint.user.region.UserRegionClient; import com.red.circle.other.inner.endpoint.user.user.UserSvipClient; + +import java.math.BigDecimal; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -69,6 +72,7 @@ public class AppInAppPurchaseCmdExe { private final InAppPurchaseProductGateway appPurchaseProductRepository; private final OrderPurchaseFriendshipRecordService orderPurchaseFriendshipRecordService; private final FactoryForExtractAppPurchaseOrderStrategy factoryForExtractAppPurchaseOrderStrategy; + private final UserLevelClient userLevelClient; public PurchaseReceiptCO execute(AbstractPurchaseCmd cmd) { // 提取单据 @@ -136,6 +140,9 @@ public class AppInAppPurchaseCmdExe { event.getProductConfig().getUnitPrice(), getMonthlyRechargeType(event)); + //计入财富榜 + userLevelClient.incrWealthExp(event.getAcceptUserId(), BigDecimal.valueOf(event.getProductConfig().getProductConfigCandy().longValue())); + // SVip积分累计 userSvipClient.incrIntegral(event.getAcceptUserId(), event.getCandyQuantity().longValue()); 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 81286961..1894178f 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 @@ -21,6 +21,7 @@ import com.red.circle.order.inner.model.enums.inapp.InAppPurchaseStatus; import com.red.circle.other.inner.endpoint.activity.AppRankCountClient; import com.red.circle.other.inner.endpoint.activity.CumulativeRechargeClient; import com.red.circle.other.inner.endpoint.material.props.PropsToolClient; +import com.red.circle.other.inner.endpoint.user.user.UserLevelClient; import com.red.circle.other.inner.model.cmd.material.PrizeDescribe; import com.red.circle.other.inner.model.cmd.material.PrizeDescribeRewardCmd; import com.red.circle.tool.core.collection.CollectionUtils; @@ -62,6 +63,7 @@ public class InAppPurchaseCommon { private final InAppPurchaseDetailsService inAppPurchaseDetailsService; private final OrderPurchaseHistoryService orderPurchaseHistoryService; private final InAppPurchaseCollectionReceiptService inAppPurchaseCollectionReceiptService; + private final UserLevelClient userLevelClient; public void inAppPurchaseReceipt(InAppPurchaseDetails order) { @@ -149,6 +151,9 @@ public class InAppPurchaseCommon { order.getAcceptUserId(), amount.longValue()); + //计入财富榜 + userLevelClient.incrWealthExp(order.getAcceptUserId(), amount); + // 累计今日充值,每日累计充值抽奖活动 cumulativeRechargeClient.incrTodayRechargeScore( order.getAcceptUserId(),