Commit 23b14dbc by 杨树贤

修复bug

parent b9ef5f05
...@@ -320,7 +320,7 @@ class SupplierService ...@@ -320,7 +320,7 @@ class SupplierService
$newSupplier = $supplierTransformer->transformInfo($newSupplier); $newSupplier = $supplierTransformer->transformInfo($newSupplier);
$logType = !empty($channel['supplier_id']) ? LogModel::UPDATE_OPERATE : LogModel::ADD_OPERATE; $logType = !empty($channel['supplier_id']) ? LogModel::UPDATE_OPERATE : LogModel::ADD_OPERATE;
$logAction = !empty($channel['supplier_id']) ? "修改供应商基本资料" : "新增供应商"; $logAction = !empty($channel['supplier_id']) ? "修改供应商基本资料" : "新增供应商";
$logContent = !empty($channel['supplier_id']) ? '修改供应商' : '新增供应商基础信息'; $logContent = !empty($channel['supplier_id']) ? '修改供应商' : '新增供应商基础信息' . ($isDirectApply ? '(直接申请审核)' : '(草稿)');
//判断是不是申请重新入驻 //判断是不是申请重新入驻
if (!empty($oldSupplier['status']) && $oldSupplier['status'] == -2) { if (!empty($oldSupplier['status']) && $oldSupplier['status'] == -2) {
$logAction = "申请重新入驻"; $logAction = "申请重新入驻";
......
...@@ -258,9 +258,10 @@ class SyncSupplierService ...@@ -258,9 +258,10 @@ class SyncSupplierService
} }
} else { } else {
$preStatus = $redis->hget('supplier_status_before_disable', $supplierId); $preStatus = $redis->hget('supplier_status_before_disable', $supplierId);
if (empty($preStatus)) { if ($preStatus === null) {
$preStatus = $status; $preStatus = $status;
} }
$redis->hdel('supplier_status_before_disable', $supplierId); $redis->hdel('supplier_status_before_disable', $supplierId);
} }
//修改供应商的状态 //修改供应商的状态
......
...@@ -82,5 +82,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -82,5 +82,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
\App\Model\SupplierChannelModel::whereIn('supplier_id', [15851, 15850])->update(['status' => 0]); (new \App\Http\Services\SyncSupplierService())->receiveEntityResult('测试供应商2023110604',1);
}); });
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