Commit bdc3ba69 by 杨树贤

没有内容变化打日志

parent 2dd5ccf5
Showing with 5 additions and 2 deletions
......@@ -268,13 +268,14 @@ class SupplierService
$logContent = '确认新增供应商';
}
//过滤掉没有修改的操作,不需要记录日志
//过滤掉没有修改的操作,但是需要记录一条更新记录(用于判断是否可以审核)
if (!empty($oldSupplier) && !empty($newSupplier)) {
$oldSupplier = $oldSupplier->toArray();
$newSupplier = $newSupplier->toArray();
unset($oldSupplier['update_time']);
unset($newSupplier['update_time']);
if ($oldSupplier == $newSupplier) {
$logService->AddLog($this->newSupplierId, LogModel::UPDATE_OPERATE, '修改供应商基本资料', '没有内容变化');
return $supplierId;
}
}
......@@ -435,7 +436,7 @@ class SupplierService
'update_time' => time(),
'channel_uid' => $preChannelUid,
]);
}else{
} else {
$result = $model->where('supplier_id', $supplierId)->update([
'channel_uid' => $preChannelUid,
]);
......@@ -540,6 +541,8 @@ class SupplierService
if (!$result) {
return $result;
}
//新增一条申请审核的日志
// (new LogService())->AddLog($data['supplier_id'], LogModel::UPDATE_OPERATE, '申请审核', '申请审核供应商');
}
return 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