Authored by peuei

fix

... ... @@ -870,6 +870,10 @@ public class ProductServiceImpl implements ProductService {
SkupDetailForScreenInfo innerResult = new SkupDetailForScreenInfo();
// 获取 sku-p 信息
StoragePrice storagePrice = storagePriceMapper.selectBySkup(skuP);
if (storagePrice == null) {
LOGGER.info("getSkuPDetailForShopsScreen error , can not get storagePrice info by sku-p {}", skuP);
throw new ServiceException(400, StringUtils.join(skuP, "错误"));
}
final Integer storeId = sellerStoreMapUtil.getStoreIdBySellerUid(storagePrice.getSellerUid());
if (storeId == null) {
LOGGER.info("can not get storeId by sellerUid, sellerUid = {} sku-p = {}", storagePrice.getSellerUid(), skuP);
... ... @@ -877,10 +881,6 @@ public class ProductServiceImpl implements ProductService {
}
// 获取 sellerUid
final Integer sellerUid = storagePrice.getSellerUid();
if (storagePrice == null) {
LOGGER.info("getSkuPDetailForShopsScreen error , can not get storagePrice info by sku-p {}", skuP);
throw new ServiceException(400, StringUtils.join(skuP, "错误"));
}
final Integer productId = storagePrice.getProductId();
// 根据 skn 获取商品信息
Product product = productMapper.selectByPrimaryKey(productId);
... ... @@ -983,10 +983,8 @@ public class ProductServiceImpl implements ProductService {
innerResult.setOtherSize(innerList);*/
}
// 获取二维码
String origin = "https://o.yohobuy.com/ufo?p={storeId_Uid}&productId={skn}&skn={skn}&openby:yohobuy={\"action\":\"go.ufo\",\"params\":{\"pagename\":\"productDetail\",\"productId\":\"{skn}\"}}";
// String origin = "https://o.yohobuy.com/ufo?p={storeId_Uid}&skup={sku_p}&productId={skn}&skn={skn}";
String qrCode = origin.replace("{storeId_Uid}", StringUtils.join(skuP, ",", storeId))
.replace("{sku_p}", Integer.toString(skuP))
String origin = "https://o.yohobuy.com/ufo?p={skuP_storeId}&productId={skn}&skn={skn}&openby:yohobuy={\"action\":\"go.ufo\",\"params\":{\"pagename\":\"productDetail\",\"productId\":\"{skn}\"}}";
String qrCode = origin.replace("{skuP_storeId}", StringUtils.join(skuP, ",", storeId))
.replace("{skn}", Integer.toString(productId));
innerResult.setQrCode(qrCode);
... ...