商店购买新增VIP折扣逻辑
This commit is contained in:
parent
aaeae43169
commit
f359ed23b6
@ -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<String, String> origin = getOriginCode(cmd, commodity);
|
||||
|
||||
if (cmd.isPayDiamond()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user