| | |
| | | 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;
|
| | |
| | | * @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();
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取淘宝联盟的授权链接
|
| | | *
|