wesmiler 2 年之前
父節點
當前提交
7ecf6aebe2
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      app/Services/Api/GoodsService.php

+ 6 - 3
app/Services/Api/GoodsService.php

@@ -197,9 +197,12 @@ class GoodsService extends BaseService
                 }
             }
             unset($item);
+            RedisService::set($cacheKey . '_page', $page, rand(300, 600));
+        }else{
+            RedisService::set($cacheKey . '_page', 1, rand(300, 600));
         }
 
-        return ['count' => count($goods), 'updated' => $updated, 'errorCount' => $error];
+        return ['count' => count($goods), 'updated' => $updated, 'errorCount' => $error,'page'=>$page];
     }
 
     /**
@@ -307,7 +310,7 @@ class GoodsService extends BaseService
         }
 
 
-        return ['count' => count($goods), 'updated' => $updated, 'errorCount' => $error];
+        return ['count' => count($goods), 'updated' => $updated, 'errorCount' => $error,'page'=>$page];
     }
 
     /**
@@ -363,7 +366,7 @@ class GoodsService extends BaseService
         }
 
 
-        return ['count' => count($categorys), 'updated' => $updated, 'errorCount' => $error];
+        return ['count' => count($categorys), 'updated' => $updated, 'errorCount' => $error,'page'=>$page];
     }
 
     /**