Commit bdc3ba69 by 杨树贤

没有内容变化打日志

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