同步信息
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\logic\ModuleLogic::syncAccount |
| 所属业务 | 用户管理 |
| 来源模块/系统 | 模块逻辑 |
功能说明
同步信息,返回了对应的键才会同步修改
调用示例
$HostModel = 'string';
$result = (new \app\common\logic\ModuleLogic())->syncAccount($HostModel);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
HostModel | HostModel | 是 | — | require | 产品模型 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态(200=成功,400=失败) |
msg | string | 信息 |
data.dedicate_ip | string | 主IP |
data.assign_ip | string | 附加IP |
data.country_id | int | 国家ID |
data.city | string | 城市 |
data.area | string | 区域 |
data.power_status | string | 电源状态(on=开机,off=关机,suspend=暂停,operating=操作中,fault=故障) |
data.image_icon | string | 操作系统图标(Windows,CentOS,Ubuntu,Debian,ESXi,XenServer,FreeBSD,Fedora,ArchLinux,Rocky,AlmaLinux,OpenEuler,RedHat,其他) |
data.image_name | string | 操作系统名称 |
正常返回
{
"status": 1,
"msg": "string",
"data": {
"dedicate_ip": "192.0.2.1",
"assign_ip": "example-token",
"country_id": 1,
"city": "string",
"area": "string",
"power_status": "Active",
"image_icon": "string",
"image_name": "示例名称"
}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |