该接口用于添加一个新的物业公司,并关联小区和分配菜单权限。
POST
http://{ip}:{port}/app/property.saveProperty
POST
参数名称 | 必填 | 类型 | 描述 |
---|---|---|---|
Authorization |
是 | String |
用户认证 Token |
app-id |
是 | String |
应用 ID |
transaction-id |
是 | String |
请求流水号(不能重复) |
sign |
是 | String |
签名 |
req-time |
是 | String |
请求时间(YYYYMMDDhhmmss ) |
参数名称 | 必填 | 类型 | 描述 | 示例 |
---|---|---|---|---|
name |
是 | String |
物业公司名称 | "物业公司A" |
address |
是 | String |
公司地址 | "北京市朝阳区XX路XX号" |
tel |
是 | String |
管理员手机号(作为账号) | "18909711449" |
corporation |
是 | String |
法人代表 | "张三" |
foundingTime |
是 | String |
成立日期(YYYY-MM-DD ) |
"2022-09-01" |
nearbyLandmarks |
否 | String |
地标(如“XX公园旁”) | "国投广场" |
communityIds |
否 | Array<String> |
关联的小区 ID 列表 | ["2022092200930358"] |
groupIds |
否 | Array<String> |
分配的菜单组 ID 列表 | ["802021080609660006"] |
{
"name": "物业公司A",
"address": "北京市朝阳区XX路XX号",
"tel": "18909711449",
"corporation": "张三",
"foundingTime": "2022-09-01",
"nearbyLandmarks": "国投广场",
"groupIds": ["802021080609660006"],
"communityIds": ["2022092200930358"]
}
参数名称 | 类型 | 描述 | 示例 |
---|---|---|---|
code |
int |
返回码(0 成功,其他失败) |
0 |
msg |
String |
返回信息 | "成功" |
{
"code": 0,
"msg": "成功"
}
name
、address
、tel
、corporation
、foundingTime
)。 storeId
,保存物业公司信息。 tel
作为账号,默认密码为手机号 MD5 加密。 communityIds
,则绑定物业公司与小区。 groupIds
,则分配对应的菜单权限。 错误码 | 描述 | 可能原因 |
---|---|---|
-1 |
保存数据失败 | 数据库操作异常 |
-2 |
小区已入驻 | 传入的 communityId 已关联其他物业公司 |
-3 |
未配置物业默认权限 | 系统未配置默认权限 |
name
、address
、tel
、corporation
、foundingTime
。 mapX
、mapY
默认为 "1"
(坐标)。 communityIds
,物业公司不会关联任何小区。curl -X POST \
http://localhost:8080/app/property.saveProperty \
-H 'Authorization: Bearer xxxxxx' \
-H 'Content-Type: application/json' \
-H 'app-id: micro-community' \
-H 'transaction-id: 100000000020240101120000000001' \
-H 'req-time: 20240101120000' \
-d '{
"name": "物业公司A",
"address": "北京市朝阳区XX路XX号",
"tel": "18909711449",
"corporation": "张三",
"foundingTime": "2022-09-01",
"nearbyLandmarks": "国投广场",
"groupIds": ["802021080609660006"],
"communityIds": ["2022092200930358"]
}'
{
"code": 0,
"msg": "成功"
}
{
"code": -2,
"msg": "小区已入驻"
}
文档版本:v1.0
最后更新:2024-01-01