Browse Source

供应链修改

yumeng 2 years ago
parent
commit
b3a6169e9c

+ 5 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemListServiceImpl.java

@@ -102,10 +102,13 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
         StringBuffer stringBuffer = new StringBuffer();
 
         KuaishouItemCategory category = kuaishouItemListMapper.getCategoryInfo(categoryId);
+
+        if (Check.isNull(category)) {
+            return null;
+        }
         KuaishouItemCategory secondCategory = new KuaishouItemCategory();
         KuaishouItemCategory thirdCategory = new KuaishouItemCategory();
         if (category.getCategorySort() == 1) {
-
             stringBuffer.append(category.getCategoryName());
         } else if (category.getCategorySort() == 2) {
             secondCategory = kuaishouItemListMapper.getCategoryInfo(category.getParentId());
@@ -239,7 +242,7 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
             returnJson.put("message", "快分销招商商品数据返回为data数据为空");
             return returnJson;
         }
-       JSONObject itemJson = dataArray.getJSONObject(0);
+        JSONObject itemJson = dataArray.getJSONObject(0);
         itemJson.put("detailUrl", "https://app.kwaixiaodian.com/merchant/shop/detail?id=" + itemId);
         returnJson.put("judgeStatus", 2);
         returnJson.put("itemJson", itemJson);