Authored by peuei

fix

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