Commit a9fb0059 by songyinghui

feat: 字段统一

parent 93b7da6b
......@@ -19,6 +19,7 @@ import com.gic.haoban.manage.web.qo.content.ContentMaterialShareQO;
import com.gic.haoban.manage.web.vo.content.ContentColumnInfoVO;
import com.gic.haoban.manage.web.vo.content.ContentMaterialInfoVO;
import com.gic.haoban.manage.web.vo.content.ContentMaterialShareInfoVO;
import com.gic.haoban.manage.web.vo.content.SimpleGoodsInfoVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -112,6 +113,17 @@ public class ContentMaterialController {
.map(item -> {
ContentMaterialInfoVO contentMaterialInfoVO = new ContentMaterialInfoVO();
BeanUtils.copyProperties(item, contentMaterialInfoVO);
if (CollectionUtils.isNotEmpty(item.getContentGoodsList())){
List<SimpleGoodsInfoVO> goodsInfoVOS = item.getContentGoodsList()
.stream()
.map(temp -> {
SimpleGoodsInfoVO simpleGoodsInfoVO = new SimpleGoodsInfoVO();
BeanUtils.copyProperties(temp, simpleGoodsInfoVO);
simpleGoodsInfoVO.setGoodsImg(temp.getGoodsImageUrl());
return simpleGoodsInfoVO;
}).collect(Collectors.toList());
contentMaterialInfoVO.setContentGoodsList(goodsInfoVOS);
}
contentMaterialInfoVO.setPublishTime(item.getPublishBeginTime());
if (StringUtils.isNotBlank(item.getMaterialImageUrls())) {
String[] split = StringUtils.split(item.getMaterialImageUrls(), ",");
......
......@@ -18,7 +18,7 @@ public class SimpleGoodsInfoVO implements Serializable {
/**
* 商品图片
*/
private String goodsImageUrl;
private String goodsImg;
/**
* 商品货号
......@@ -34,6 +34,16 @@ public class SimpleGoodsInfoVO implements Serializable {
*/
private Integer spuStock;
/**
* 商品分类
*/
private String goodsCategory;
/**
* 品牌名称
*/
private String brandName;
public String getGoodsId() {
return goodsId;
}
......@@ -42,14 +52,6 @@ public class SimpleGoodsInfoVO implements Serializable {
this.goodsId = goodsId;
}
public String getGoodsImageUrl() {
return goodsImageUrl;
}
public void setGoodsImageUrl(String goodsImageUrl) {
this.goodsImageUrl = goodsImageUrl;
}
public String getGoodsCode() {
return goodsCode;
}
......@@ -73,4 +75,28 @@ public class SimpleGoodsInfoVO implements Serializable {
public void setSpuStock(Integer spuStock) {
this.spuStock = spuStock;
}
public String getGoodsImg() {
return goodsImg;
}
public void setGoodsImg(String goodsImg) {
this.goodsImg = goodsImg;
}
public String getGoodsCategory() {
return goodsCategory;
}
public void setGoodsCategory(String goodsCategory) {
this.goodsCategory = goodsCategory;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment