Commit c212776b by 叶明星

切换RedisDB

parent ecd81b28
...@@ -9,11 +9,12 @@ use App\Model\SelfGoodsModel; ...@@ -9,11 +9,12 @@ use App\Model\SelfGoodsModel;
use App\Model\SkuModel; use App\Model\SkuModel;
use App\Model\SpuModel; use App\Model\SpuModel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class ServicesController extends Controller class ServicesController extends Controller
{ {
public function synchronization(){ public function synchronization(){
Log::info(microtime(true));
$collert=TrimX(['goods_id','power'], false); $collert=TrimX(['goods_id','power'], false);
if(empty($collert['goods_id'])) return $this->Export($this->ProduceErrcode(001,1),'没有SKUID'); if(empty($collert['goods_id'])) return $this->Export($this->ProduceErrcode(001,1),'没有SKUID');
if(empty($collert['power'])) if(empty($collert['power']))
...@@ -33,6 +34,7 @@ class ServicesController extends Controller ...@@ -33,6 +34,7 @@ class ServicesController extends Controller
$data[$SkuId]=false; $data[$SkuId]=false;
$data[$SkuId]=$GoodsModel->WebSelfGoodsDetail($SkuId, $collert['power'], $Redis); $data[$SkuId]=$GoodsModel->WebSelfGoodsDetail($SkuId, $collert['power'], $Redis);
} }
Log::info(microtime(true));
return $this->Export(0,'success',['data'=>$data]); return $this->Export(0,'success',['data'=>$data]);
} }
......
...@@ -171,20 +171,19 @@ return [ ...@@ -171,20 +171,19 @@ return [
'cluster' => env('REDIS_CLUSTER', false), 'cluster' => env('REDIS_CLUSTER', false),
'options' => [ 'options' => [
'cluster' => env('REDIS_CLUSTER', false), 'cluster' => env('REDIS_CLUSTER', false),
'prefix' => env('REDIS_PREFIX'),
], ],
'default' => [ 'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => 0, 'database' => 10,
'persistent' => true, // 开启持久连接 'persistent' => true, // 开启持久连接
], ],
'read' =>[ 'read' =>[
'host' => env('REDIS_READ_HOST', ''), 'host' => env('REDIS_READ_HOST', ''),
'password' => env('REDIS_READ_PASSWORD', null), 'password' => env('REDIS_READ_PASSWORD', null),
'port' => env('REDIS_READ_PORT', 6379), 'port' => env('REDIS_READ_PORT', 6379),
'database' => 0, 'database' => 10,
'persistent' => true, // 开启持久连接 'persistent' => true, // 开启持久连接
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment