| | |
| | | package com.yeshi.fanli.util.vipshop;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import org.yeshi.utils.BigDecimalUtil;
|
| | |
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil;
|
| | |
|
| | | public class VipShopUtil {
|
| | |
|
| | | /**
|
| | |
| | | return tag.split("#")[0];
|
| | | }
|
| | |
|
| | | public static BigDecimal getGoodsFanLiMoney(VIPGoodsInfo goods, BigDecimal rate) {
|
| | | BigDecimal money = null;
|
| | | BigDecimal hundred = new BigDecimal(100);
|
| | | rate = MoneyBigDecimalUtil.div(rate, hundred);
|
| | | money = MoneyBigDecimalUtil.mul(new BigDecimal(goods.getCommission()), rate);
|
| | | return BigDecimalUtil.getWithNoZera(money).setScale(2);
|
| | | }
|
| | | }
|