Authored by caoyan

商品详情增加传图模块

... ... @@ -3,7 +3,6 @@ package com.yoho.ufo.controller.product;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
... ...
... ... @@ -151,12 +151,16 @@ public class SizePoolService implements ISizePoolService{
SizePoolResp resp = new SizePoolResp();
resp.setId(sizePoolId);
resp.setRangeType(sizePool.getRangeType());
resp.setImageUrl(sizePool.getImageUrl());
buildImageResp(resp, imageList);
buildResp(resp, list);
return resp;
}
private void buildImageResp(SizePoolResp resp, List<SizePoolImage> imageList) {
if(CollectionUtils.isEmpty(imageList)) {
return;
}
List<SizePoolImageBo> list = Lists.newArrayList();
for(SizePoolImage item : imageList) {
SizePoolImageBo image = new SizePoolImageBo();
... ... @@ -212,6 +216,7 @@ public class SizePoolService implements ISizePoolService{
resp.setStatus(pool.getStatus());
resp.setStatusStr(getStatusStr(pool.getStatus()));
resp.setRangeTypeStr(getRangeTypeStr(pool.getRangeType()));
resp.setImageUrl(pool.getImageUrl());
buildImageResp(resp, poolIdImageMap.get(pool.getId()));
List<SizePoolDetail> itemList = poolIdMap.get(pool.getId());
if(CollectionUtils.isNotEmpty(itemList)) {
... ...