作者 lyh

修改生成日志问题

... ... @@ -26,7 +26,8 @@ class Common
$data = [
'operator_id'=>$param['operator_id'],
'model'=>$param['model'],
'remark'=>$param['remark']
'remark'=>$param['remark'],
'project_id'=>$param['project_id']
];
$model = new UserLogModel();
return $model->add($data);
... ...
... ... @@ -159,7 +159,7 @@ class BaseController extends Controller
$log = config('logging.operator_log');
if(isset($log) && $log['log'] == true){
if(empty($log['action']) || (strpos($log['action'],$this->request->route()->getName()) === false)){
Common::set_user_log(['model'=>$this->request->route()->getName(),'remark'=>'请求的参数:param = '.json_encode($this->param),'operator_id'=>$this->uid,'type'=>isset($this->user['manager_id']) ? 1 : 0]);
Common::set_user_log(['project_id'=>$this->user['project_id'] ?? 0,'model'=>$this->request->route()->getName(),'remark'=>'请求的参数:param = '.json_encode($this->param),'operator_id'=>$this->uid,'type'=>isset($this->user['manager_id']) ? 1 : 0]);
}
}
return true;
... ...