Commit f0b23786 by zhiwj

门店添加默认图片

parent 606a4ceb
......@@ -458,7 +458,8 @@ public class StoreApiServiceImpl implements StoreApiService {
List<String> list = Optional.ofNullable(photoList).orElse(Collections.emptyList()).stream().map(StorePhotoDTO::getImageUrl).collect(Collectors.toList());
// todo 给一个门店图片默认值测试
if (CollectionUtils.isNotEmpty(list)) {
list = Arrays.asList("http://gicdev.demogic.com/gic-web/static/img/side-img.dc95242.png");
// list = Arrays.asList("http://gicdev.demogic.com/gic-web/static/img/side-img.dc95242.png");
list = Arrays.asList("https://pic01-10001430.image.myqcloud.com/a5a82c47-5892-4c1c-afaf-0f8d4d41e032");
}
resultMap.put(storeDTO.getStoreId(), list);
}
......@@ -581,6 +582,17 @@ public class StoreApiServiceImpl implements StoreApiService {
storeSearchDTO.setCityId(nearByStoreSearchDTO.getCityId());
storeSearchDTO.setStoreResource(Long.valueOf(storeWidgetId+""));
ServiceResponse<Page<StoreDTO>> storePage = this.listStore(storeSearchDTO, nearByStoreSearchDTO.getPageNum(), nearByStoreSearchDTO.getPageSize());
List<StoreDTO> list = storePage.getResult().getResult();
StorePhotoDTO storePhotoDTO = new StorePhotoDTO();
storePhotoDTO.setImageUrl("https://pic01-10001430.image.myqcloud.com/a5a82c47-5892-4c1c-afaf-0f8d4d41e032");
List<StorePhotoDTO> defaultList = Collections.singletonList(storePhotoDTO);
if (CollectionUtils.isNotEmpty(list)) {
for (StoreDTO storeDTO : list) {
if (CollectionUtils.isNotEmpty(storeDTO.getPhotoList())) {
storeDTO.setPhotoList(defaultList);
}
}
}
logger.info("pageNearbyStore:{}", JSON.toJSONString(storePage, true));
return ServiceResponse.success(storePage.getResult());
}
......
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