| | |
| | | private static TaoBaoGoodsBriefExtra loadYuShouInfo(TaoBaoGoodsBriefExtra extra, TaoBaoGoodsBrief goods) {
|
| | | if (goods != null && extra != null) {
|
| | | if (isYUShou(goods)) {// 预售商品
|
| | | extra.setZkPrice(new BigDecimal(goods.getPresaleDeposit()));
|
| | | // extra.setZkPrice(new BigDecimal(goods.getPresaleDeposit()));
|
| | | // 预售
|
| | | if (extra.getLabels() == null)
|
| | | extra.setLabels(new ArrayList<>());
|
| | | extra.getLabels().add(new ClientTextStyleVO("预售", "#FF2B4E"));
|
| | | if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {// 在标题添加优惠信息
|
| | | extra.setTitle(String.format("【%s】", goods.getPresaleDiscountFeeText()) + extra.getTitle());
|
| | | }
|
| | | }
|
| | | }
|
| | | return extra;
|
| | |
| | | */
|
| | | public static BigDecimal getGoodsHongBaoMoney(TaoBaoGoodsBrief goodsBrief, BigDecimal rate) {
|
| | | BigDecimal money = null;
|
| | |
|
| | | // 预售商品
|
| | | if (isYUShou(goodsBrief)) {
|
| | | if (goodsBrief.getYsylCommissionRate() != null)
|
| | | money = MoneyBigDecimalUtil.mul(
|
| | | MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul(new BigDecimal(goodsBrief.getPresaleDeposit()),
|
| | | goodsBrief.getYsylCommissionRate()), new BigDecimal("0.0001")),
|
| | | MoneyBigDecimalUtil.div(rate, new BigDecimal(100)));
|
| | | else
|
| | | money = MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul(
|
| | | MoneyBigDecimalUtil.mul(goodsBrief.getZkPrice(), goodsBrief.getTkRate()),
|
| | | new BigDecimal("0.01")), MoneyBigDecimalUtil.div(rate, new BigDecimal(100)));
|
| | |
|
| | | return money;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(goodsBrief.getCouponInfo())
|
| | | || goodsBrief.getCouponInfo().trim().equalsIgnoreCase("无")) {
|
| | | money = MoneyBigDecimalUtil.mul(
|
| | |
| | |
|
| | | /**
|
| | | * 提取自有格式的淘口令
|
| | | * |
| | | * @param str
|
| | | * @return
|
| | | */
|