| | |
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.order.CommonOrderGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | |
| | | return goods;
|
| | | }
|
| | |
|
| | | public static CommonOrderGoods create(VIPGoodsInfo vipGoods) {
|
| | | CommonOrderGoods goods = new CommonOrderGoods();
|
| | | goods.setGoodsId(vipGoods.getGoodsId() + "");
|
| | | goods.setCreateTime(new Date());
|
| | | goods.setGoodsType(Constant.SOURCE_TYPE_VIP);
|
| | | goods.setPicture(vipGoods.getGoodsMainPicture());
|
| | | goods.setPrice(new BigDecimal(vipGoods.getVipPrice()));
|
| | | if (vipGoods.getBrandId() != null) {
|
| | | goods.setShopId(vipGoods.getBrandId());
|
| | | goods.setShopName(vipGoods.getBrandName());
|
| | | }
|
| | | goods.setShopType("唯品会");
|
| | | goods.setState(0);
|
| | | goods.setTitle(vipGoods.getGoodsName());
|
| | | return goods;
|
| | | }
|
| | |
|
| | | public static CommonOrderGoods create(SuningGoodsInfo suningGoods) {
|
| | | CommonOrderGoods goods = new CommonOrderGoods();
|
| | | goods.setGoodsId(suningGoods.getCommodityInfo().getCommodityCode());
|
| | | goods.setCreateTime(new Date());
|
| | | goods.setGoodsType(Constant.SOURCE_TYPE_SUNING);
|
| | | if (suningGoods.getCommodityInfo().getPictureUrl().size() > 0)
|
| | | goods.setPicture(suningGoods.getCommodityInfo().getPictureUrl().get(0).getPicUrl());
|
| | | goods.setPrice(new BigDecimal(suningGoods.getCommodityInfo().getCommodityPrice()));
|
| | | goods.setShopId(Long.parseLong(suningGoods.getCommodityInfo().getSupplierCode()));
|
| | | goods.setShopName(suningGoods.getCommodityInfo().getSupplierName());
|
| | | goods.setShopType("苏宁");
|
| | | goods.setState(0);
|
| | | goods.setTitle(suningGoods.getCommodityInfo().getCommodityName());
|
| | | return goods;
|
| | | }
|
| | |
|
| | | }
|