Commit 2cf74328 by 杨树贤

多个供应商实体化广播问题

parent 0b3de077
...@@ -279,12 +279,13 @@ class SyncSupplierService ...@@ -279,12 +279,13 @@ class SyncSupplierService
(new ChainService())->changeChainIsEntity($supplierName, $isEntityResult); (new ChainService())->changeChainIsEntity($supplierName, $isEntityResult);
//先找到对应的供应商(草稿的跳过),如果没有那跳过 //先找到对应的供应商(草稿的跳过),如果没有那跳过
$supplier = SupplierChannelModel::where('supplier_name', $supplierName)->first(); $suppliers = SupplierChannelModel::where('supplier_name', $supplierName)->get()->toArray();
if (empty($supplier)) { if (empty($suppliers)) {
Log::error('供应商不存在'); Log::error('供应商不存在');
return true; return true;
} }
$supplier = $supplier->toArray(); foreach ($suppliers as $supplier) {
//$supplier = $supplier->toArray();
$supplierId = $supplier['supplier_id']; $supplierId = $supplier['supplier_id'];
//先把修改之前的状态给记录下来 //先把修改之前的状态给记录下来
$status = $supplier['status']; $status = $supplier['status'];
...@@ -386,8 +387,6 @@ class SyncSupplierService ...@@ -386,8 +387,6 @@ class SyncSupplierService
} }
} }
} }
} }
}
} }
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
use App\Http\Services\CompanyService; use App\Http\Services\CompanyService;
use App\Http\Services\DepartmentService; use App\Http\Services\DepartmentService;
use App\Http\Services\SkuService; use App\Http\Services\SkuService;
use App\Model\RedisModel;
Route::group(['middleware' => ['web', 'menu']], function () { Route::group(['middleware' => ['web', 'menu']], function () {
Route::get('/', 'WebController@Entrance'); Route::get('/', 'WebController@Entrance');
...@@ -89,5 +90,7 @@ Route::match(['get', 'post'], '/test', function () { ...@@ -89,5 +90,7 @@ Route::match(['get', 'post'], '/test', function () {
//\App\Model\SupplierChannelModel::where('supplier_id', 11042)->update([ //\App\Model\SupplierChannelModel::where('supplier_id', 11042)->update([
// 'supplier_address' => 'xx测试猎芯123xx' // 'supplier_address' => 'xx测试猎芯123xx'
//]); //]);
\App\Http\Services\DataService::repairAccount(); //$redis = new RedisModel();
//dd($redis->hget('api_coupon',476));
//\App\Http\Services\DataService::repairAccount();
}); });
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