Commit f68c320e by 杨树贤

修复

parent 6936c1c4
...@@ -279,9 +279,7 @@ class SyncSupplierService ...@@ -279,9 +279,7 @@ class SyncSupplierService
$supplierAccount = $supplierAccount->toArray(); $supplierAccount = $supplierAccount->toArray();
$accountPreStatus = $supplierAccount['a_status']; $accountPreStatus = $supplierAccount['a_status'];
if ($isEntity) { if ($isEntity) {
if (!$redis->hget('supplier_account_status_before_disable', $supplierId)) {
$redis->hset('supplier_account_status_before_disable', $supplierId, $accountPreStatus); $redis->hset('supplier_account_status_before_disable', $supplierId, $accountPreStatus);
}
} else { } else {
$accountPreStatus = $redis->hget('supplier_account_status_before_disable', $supplierId); $accountPreStatus = $redis->hget('supplier_account_status_before_disable', $supplierId);
$redis->hdel('supplier_account_status_before_disable', $supplierId, $accountPreStatus); $redis->hdel('supplier_account_status_before_disable', $supplierId, $accountPreStatus);
......
...@@ -82,5 +82,6 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -82,5 +82,6 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\SyncSupplierService())->receiveEntityResult('沛县懒洋洋服装店', 1); //(new \App\Http\Services\SyncSupplierService())->receiveEntityResult('华为投资控股有限公司', -1);
(new \App\Http\Services\SyncSupplierService())->syncSupplierToUnitedResult(json_decode('{"group_code":"G012179","source_sn":0,"company_name":"华为投资控股有限公司","init_nature":"原厂","company_nature":"原厂","company_category":"普通供应商"}',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