智简魔方文档

添加系统日志

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\SystemLogModel::createSystemLog
所属业务公共接口
来源模块/系统系统日志模型

功能说明

添加系统日志

调用示例

$param = ['description' => '192.0.2.1', 'type' => 'string', 'rel_id' => 1];
$result = (new \app\common\model\SystemLogModel())->createSystemLog($param);

参数

参数类型必填默认值校验规则说明
param.descriptionstring描述
param.typestring关联类型
param.rel_idint关联ID

返回值

返回项类型说明
statusint状态码,200成功,400失败
msgstring提示信息
dataobject返回数据

正常返回

{
  "status": 1,
  "msg": "string",
  "data": {}
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。