admin
2019-05-08 c5410b7f48a774e4ecd50019b46bc9173f2483ae
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -51,6 +51,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
import com.yeshi.fanli.entity.taobao.TaoBaoShop;
import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.goods.TaoBaoLinkService;
@@ -1329,10 +1330,11 @@
    * @return
    */
   public static String getGoodsHongBaoInfo(TaoBaoGoodsBrief goodsBrief, BigDecimal rate) {
//      if (goodsBrief != null && goodsBrief.getMaterialLibType() != null && goodsBrief.getMaterialLibType() == 0)
//         return "¥0.00";
//      else
         return "¥" + getGoodsHongBaoMoney(goodsBrief, rate).toString();
      // if (goodsBrief != null && goodsBrief.getMaterialLibType() != null &&
      // goodsBrief.getMaterialLibType() == 0)
      // return "¥0.00";
      // else
      return "¥" + getGoodsHongBaoMoney(goodsBrief, rate).toString();
   }
   /**
@@ -1688,6 +1690,29 @@
      return taoBaoGoods;
   }
   public static TaoBaoGoodsBrief convert(DaTaoKeDetail detail) {
      TaoBaoGoodsBrief taoBaoGoods = new TaoBaoGoodsBrief();
      taoBaoGoods.setAuctionId(detail.getGoodsId());
      taoBaoGoods.setBiz30day(detail.getSalesNum());
      taoBaoGoods.setCouponAmount(detail.getQuanPrice());
      taoBaoGoods.setCouponInfo(String.format("满%s元减%s元", detail.getQuanCondition(),
            MoneyBigDecimalUtil.getWithNoZera(detail.getQuanPrice())));
      taoBaoGoods.setCouponLeftCount(detail.getQuanSurplus());
      taoBaoGoods.setCouponStartFee(new BigDecimal(detail.getQuanCondition()));
      taoBaoGoods.setCouponTotalCount(detail.getQuanSurplus());
      taoBaoGoods.setPictUrl(detail.getPic());
      taoBaoGoods.setPictUrlWhite(detail.getPic());
      taoBaoGoods.setSellerId(detail.getSellerId());
      taoBaoGoods.setShopTitle("");
      taoBaoGoods.setTitle(detail.getdTitle());
      taoBaoGoods.setUserType(detail.getIsTmall());
      taoBaoGoods.setZkPrice(detail.getOrgPrice());
      taoBaoGoods.setTkRate(detail.getCommission());
      taoBaoGoods.setTkCommFee(new BigDecimal("0"));
      taoBaoGoods.setState(0);
      return taoBaoGoods;
   }
   /**
    * 获取淘宝联盟的授权链接
    *