|
@@ -231,6 +231,12 @@ class GoodsService extends BaseService
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ $cacheKey = "caches:goods:buyList:{$userId}_".md5(json_encode($params,256));
|
|
|
+ $datas = RedisService::get($cacheKey);
|
|
|
+ if($datas){
|
|
|
+ return $datas;
|
|
|
+ }
|
|
|
+
|
|
|
$goods = [];
|
|
|
$skuList = [];
|
|
|
$usdtPrice = RedisService::get("caches:wallets:usdt_rate");
|
|
@@ -312,7 +318,8 @@ class GoodsService extends BaseService
|
|
|
$this->error = 2901;
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ RedisService::set($cacheKey, ['sku_list'=> array_values($skuList), 'goods'=> $goods], rand(2,3));
|
|
|
return ['sku_list'=> array_values($skuList), 'goods'=> $goods];
|
|
|
}
|
|
|
|