Authored by chenchao

fix refresh data by status

unique data construct
... ... @@ -761,13 +761,14 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
List<SellerOrderGoods> psogList = sellerOrderGoodsMapper.selectByUidBNStatusGBBPSList(uid, bn, solt.getStatus());
if (CollectionUtils.isEmpty(psogList)){
log.warn("seller refresh,SellerOrderGoods is empty,req {} bn {} status {}", req, bn, solt.getStatus());
return null;
return SellerOrderListResp.builder().batchNo(bn).build();
}else{
boolean isEntry = userProxyService.isEntryShop(uid);
final SellerType sellerType = isEntry ? SellerType.ENTRY : SellerType.COMMON;
log.info("seller refresh ready 2 buildProductList req {}", req);
List<OrderListInfo> list = sellerOrderListService.buildOrderList(psogList,sellerType);
return SellerOrderListResp.builder().orderListInfos(list).batchNo(bn).build();
}
boolean isEntry = userProxyService.isEntryShop(uid);
final SellerType sellerType = isEntry ? SellerType.ENTRY : SellerType.COMMON;
log.info("seller refresh ready 2 buildProductList req {}", req);
List<OrderListInfo> list = sellerOrderListService.buildOrderList(psogList,sellerType);
return SellerOrderListResp.builder().orderListInfos(list).batchNo(bn).build();
}
return null;
}
... ...
... ... @@ -2,7 +2,7 @@ package com.yohoufo.order.service.impl;
import com.google.common.base.Splitter;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.bo.ProductInfo;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
import com.yohobuy.ufo.model.order.common.ButtonShow;
import com.yohobuy.ufo.model.order.common.SellerOrderListType;
import com.yohobuy.ufo.model.order.common.SellerType;
... ... @@ -211,7 +211,7 @@ public class SkupListService {
List<ButtonShowBo> buttons = Arrays.asList(ButtonShow.STORAGE_MANAGE.getBo());
orderListInfo.setButtons(buttons);
//
ProductInfo productInfo = new ProductInfo();
GoodsInfo productInfo = new GoodsInfo();
productInfo.setColorName(sellerOrderGoods.getColorName());
productInfo.setProductName(sellerOrderGoods.getProductName());
String imageUrl = ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU=");
... ... @@ -224,7 +224,7 @@ public class SkupListService {
productInfo.setStorageNum(psogOfMerge.getStorageNum());
productInfo.setSizeNum(psogOfMerge.getSizeNum());
}
orderListInfo.setProductInfo(productInfo);
orderListInfo.setGoodsInfo(productInfo);
return orderListInfo;
}
}
... ...