获取用户自定义字段
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ClientCustomFieldModel::getClientCustomField |
| 所属业务 | 用户管理 |
| 来源模块/系统 | 用户自定义字段模型 |
功能说明
获取用户自定义字段
调用示例
$param = ['client_id' => [1]];
$result = (new \app\common\model\ClientCustomFieldModel())->getClientCustomField($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.client_id | array | 是 | — | required | 用户ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 用户自定义字段列表 |
list[].client_id | int | 用户ID |
list[].custom_field | array | 自定义字段 |
list[].custom_field[].name | string | 名称 |
list[].custom_field[].value | string | 值 |
msg | string | 提示信息 |
正常返回
{
"list": [
{
"client_id": 1,
"custom_field": [
{
"name": "示例名称",
"value": "string"
}
]
}
],
"msg": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |