Authored by sailing-PC\sailing

fix

... ... @@ -66,7 +66,7 @@ public class SellerOrderService {
log.warn("in computePublishPrd storageId illegal , req {}", req);
throw new GatewayException(400, "storageId 错误");
}
StorageLeastPriceResp.StorageLeastPrice resp = ufoServiceCaller.call("ufo.product.storage.leastprice", storageId);
StorageLeastPriceResp resp = ufoServiceCaller.call("ufo.product.storage.leastprice", storageId);
BigDecimal leastPrice;
if (Objects.isNull(resp) || Objects.isNull(leastPrice = resp.getLeastPrice()) || leastPrice.doubleValue() == 0D){
throw new GatewayException(501, "暂无商品");
... ... @@ -106,14 +106,13 @@ public class SellerOrderService {
//step 1: rpc get product detail by storage id
//ufo.product.storage.data
StorageDataResp prdResp = ufoServiceCaller.call("ufo.product.storage.data", storageId);
StorageDataResp.StorageData storageData = prdResp.getProduct_info();
//getProductDetail()
//step 2: generate skup ,action :set price status(unsaleable)
if (Objects.isNull(storageData)){
if (Objects.isNull(prdResp)){
log.warn("in computePublishPrd storageId not exist in prd , req {}", req);
throw new GatewayException(400, "商品不存在");
}
int skup = skupService.addSkup(storageData);
int skup = skupService.addSkup(prdResp);
//TODO step 2: create order, set status(not pay)
//TODO generate a new real code
... ...
... ... @@ -17,8 +17,8 @@ public class SkupService {
@Autowired
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
public int addSkup(StorageDataResp.StorageData storageData){
GoodsSize goodsSize = storageData.getSizeList().get(0);
public int addSkup(StorageDataResp storageData){
GoodsSize goodsSize = storageData.getSize();
SellerOrderGoods sellerOrderGoods = new SellerOrderGoods();
... ...