| | |
| | | return list;
|
| | | }
|
| | |
|
| | | public static TaoBaoGoodsBriefExtra getTaoBaoGoodsBriefExtra(TaoBaoGoodsBrief tb, String proportion,
|
| | | String fcRateStr, String pid) {
|
| | | public static TaoBaoGoodsBriefExtra getTaoBaoGoodsBriefExtra(TaoBaoGoodsBrief tb, String proportion, String pid) {
|
| | | TaoBaoGoodsBriefExtra tg = new TaoBaoGoodsBriefExtra();
|
| | | tg.setId(tb.getId());
|
| | | tg.setAuctionId(tb.getAuctionId());
|
| | |
| | | tg.setTaoBaoQuanInfo(quanInfo);
|
| | | }
|
| | | TaoBaoHongBaoInfo hongBaoInfo = new TaoBaoHongBaoInfo();
|
| | | BigDecimal fcRate = BigDecimal.valueOf(1);
|
| | | String eventRate = tb.getEventRate();
|
| | | BigDecimal rate = BigDecimal.valueOf(0);
|
| | | if (eventRate == null) {
|
| | | rate = tb.getTkRate();
|
| | | } else {
|
| | | rate = new BigDecimal(eventRate);
|
| | | if (fcRateStr != null) {
|
| | | fcRate = (new BigDecimal(fcRateStr).divide(BigDecimal.valueOf(100)));
|
| | | }
|
| | | }
|
| | |
|
| | | hongBaoInfo.setRate("最高40%");
|
| | |
|
| | |
| | | tg.setTaoBaoQuanInfo(quanInfo);
|
| | | }
|
| | |
|
| | | Map<String, String> convertMap = taoBaoUtil.manageService.convertMap();
|
| | | String proportion = convertMap.get("hongbao_goods_proportion");
|
| | | String fcRateStr = convertMap.get("hongbao_fc_ratio");
|
| | | BigDecimal proportion = taoBaoUtil.manageService.getFanLiRate();
|
| | | TaoBaoHongBaoInfo hongBaoInfo = new TaoBaoHongBaoInfo();
|
| | | String eventRate = tb.getEventRate();
|
| | | BigDecimal rate = BigDecimal.valueOf(0);
|
| | | if (eventRate != null) {
|
| | | rate = new BigDecimal(eventRate);
|
| | | } else {
|
| | | rate = tb.getTkRate();
|
| | | }
|
| | | BigDecimal fcRate = new BigDecimal(fcRateStr);
|
| | |
|
| | | String tkMktStatus = tb.getTkMktStatus();
|
| | | if ("1".equals(tkMktStatus)) {
|
| | | hongBaoInfo.setType(1);
|
| | |
| | |
|
| | | hongBaoInfo.setRate("最高40%");
|
| | |
|
| | | String hongbao = getGoodsHongBaoInfo(tb, new BigDecimal(proportion));
|
| | | String hongbao = getGoodsHongBaoInfo(tb, proportion);
|
| | | if (!hongbao.contains("最高"))
|
| | | hongBaoInfo.setHongbao(new BigDecimal(hongbao.replace("¥", "")));
|
| | | else
|
| | |
| | | BigDecimal finalPrice = goodsBrief.getZkPrice().subtract(couponAccount);
|
| | | return finalPrice.multiply(goodsBrief.getTkRate()).divide(new BigDecimal(10000)).multiply(rate)
|
| | | .setScale(2, BigDecimal.ROUND_DOWN);
|
| | |
|
| | | } else {// 不能用券
|
| | | return goodsBrief.getZkPrice().multiply(goodsBrief.getTkRate()).divide(new BigDecimal(10000))
|
| | | .multiply(rate).setScale(2, BigDecimal.ROUND_DOWN);
|