| | |
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.yeshi.fanli.dto.common.CategoryInfoDTO;
|
| | | import com.yeshi.fanli.dto.common.GoodsOtherInfoDTO;
|
| | | import com.yeshi.fanli.dto.jd.JDCategoryInfo;
|
| | | import com.yeshi.fanli.dto.jd.JDCommissionInfo;
|
| | | import com.yeshi.fanli.dto.jd.JDCouponInfo;
|
| | | import com.yeshi.fanli.dto.jd.JDShopInfo;
|
| | |
| | | cg.setVideoUrl(null);
|
| | | cg.setState(goods.getState());
|
| | | cg.setMaterialLibType(goods.getMaterialLibType());
|
| | | |
| | | |
| | | // 分类信息
|
| | | CategoryInfoDTO categoryInfo = new CategoryInfoDTO();
|
| | | Integer rootCatId = goods.getRootCatId();
|
| | | if (rootCatId != null) {
|
| | | categoryInfo.setCid1(Long.parseLong(rootCatId.toString()));
|
| | | }
|
| | | categoryInfo.setCid1Name(goods.getRootCategoryName());
|
| | | |
| | | Integer leafCatId = goods.getLeafCatId();
|
| | | if (leafCatId != null) {
|
| | | categoryInfo.setCid2(Long.parseLong(leafCatId.toString()));
|
| | | }
|
| | | categoryInfo.setCid2Name(goods.getLeafName());
|
| | | cg.setCategoryInfo(JSONObject.toJSON(categoryInfo).toString());
|
| | | |
| | | return cg;
|
| | | }
|
| | |
|
| | |
| | | other.setPinGouInfo( goods.getPinGouInfo()); // 拼购信息
|
| | | other.setIsFreeShipping(goods.getIsFreeShipping()); // 是否包邮
|
| | | cg.setOtherInfo(JSONObject.toJSON(other).toString());
|
| | | |
| | | |
| | | // 分类信息
|
| | | JDCategoryInfo categoryJD = goods.getCategoryInfo();
|
| | | if (categoryJD != null) {
|
| | | CategoryInfoDTO categoryInfo = new CategoryInfoDTO();
|
| | | categoryInfo.setCid1(categoryJD.getCid1());
|
| | | categoryInfo.setCid1Name(categoryJD.getCid1Name());
|
| | | categoryInfo.setCid2(categoryJD.getCid2());
|
| | | categoryInfo.setCid2Name(categoryJD.getCid2Name());
|
| | | categoryInfo.setCid3(categoryJD.getCid3());
|
| | | categoryInfo.setCid3Name(categoryJD.getCid3Name());
|
| | | cg.setCategoryInfo(JSONObject.toJSON(categoryInfo).toString());
|
| | | }
|
| | |
|
| | | // 保留字段
|
| | | cg.setVideoCover(null);
|
| | |
| | | cg.setVideoUrl(null);
|
| | | cg.setState(goods.getState());
|
| | | cg.setMaterialLibType(1);
|
| | | |
| | | // 分类信息
|
| | | CategoryInfoDTO categoryInfo = new CategoryInfoDTO();
|
| | | categoryInfo.setCid1(goods.getCategoryId());
|
| | | categoryInfo.setCid1Name(goods.getCategoryName());
|
| | | cg.setCategoryInfo(JSONObject.toJSON(categoryInfo).toString());
|
| | | |
| | | |
| | | return cg;
|
| | | }
|
| | |
|