diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java index 4db0e5b5..f4e66be4 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java @@ -15,6 +15,7 @@ import com.red.circle.mq.rocket.business.producer.TaskMqMessage; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.cmd.material.PropsPurchasingCmd; import com.red.circle.other.app.util.OfficialNoticeUtils; +import com.red.circle.other.domain.enums.VipBenefitType; import com.red.circle.other.domain.gateway.props.PropsStoreGateway; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway; @@ -46,6 +47,7 @@ import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd; import com.red.circle.wallet.inner.model.dto.WalletReceiptDTO; import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -228,6 +230,9 @@ public class PropsPurchasingCmdExe { } + BigDecimal userVipBenefit = userProfileGateway.getUserVipBenefit(cmd.getReqUserId(), VipBenefitType.SHOP_DISCOUNT); + amount = amount.multiply(userVipBenefit).setScale(2, RoundingMode.HALF_UP); + ImmutableKeyValuePair origin = getOriginCode(cmd, commodity); if (cmd.isPayDiamond()) {