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];
     }
 
     /**