简要描述:
- 权限保存后,推送用户栏目到库缓存库
接口版本:
| 版本号 | 制定人 | 制定日期 | 修订日期 |
|---|---|---|---|
| v3 | 陈碧贵 | 2022-03-21 | xxxx-xx-xx |
请求URL:
- http://{url参数}/bo/api/v3/bridge/popedom/push/menu-nav/actions-fields-users?ownerId=bt
- {mkey} 对应mapper文件
- {resField} 对应 {mkey}里面 responseField键
请求方式:
- POST
请求地址参数:
| 参数名 | 是否必须 | 类型 | 说明 |
|---|---|---|---|
| ownerId | 是 | string | 所有者id |
| ignore | 是 | string | true 开发情况无需权限验证 |
请求头:
| 参数名 | 是否必须 | 类型 | 说明 |
|---|---|---|---|
| XownerId | 是 | string | 项目唯一ID,对应bo_project {ownerId} |
| XsysId | 否 | string | 所属系统 对应 bo_system 表 |
| XuserFromFirstShareId | string | 否 | 一级分享用户ID, bo_user user_id |
| XuserFromSecondShareId | string | 否 | 二级分享用户ID, bo_user user_id |
| XverifyApi | 是 | string | 加密规则encryptByDES(`${newGuid()} |
| XfilterAreaCode | 否 | string | 行政区编码, 对应 bo_sys_area area_code |
| Content-Type: | 是 | string | application/json; charset=utf-8 请求类型 |
| Authorization | 是 | string | 当前用户认证信息,通过登录接口获取 Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6 |
请求参数:
{
"ids":[],
"mapperField":"menu-nav"
}
| 参数名 | 是否必须 | 类型 | 说明 |
|---|---|---|---|
| ids | 是 | string | 主键数据,如果没传递,通过配置里面sql语句获取 |
| mapperField | 是 | string | 映射文件所在的配置文件 |
mapperField 对应索引里面data对应的key
\Config\PushPullIndexs\basis\idx.json
{
"code": "0",
"success": true,
"data": {
"menu-nav": {
"moduleKey": "menu-nav",
"tableName": "menu_nav",
"reponseField": "content",
"nodeJs": "common-data-under",
"selectSql": "select user_id id from bo_user",
"connName": "ConnBo"
},
"bo-area": {
"uniqueField": "areaCode",
"requestModuleType": "detail",
"moduleKey": "bo-area",
"tableName": "bo_area",
"reponseField": "manager_detail",
"nodeJs": "common-data-under",
"selectSql": "select area_code id from bo_sys_area",
"connName": "ConnBo"
}
}
}
返回示例:
正确时返回:
{
"code": "0",
"retCode": "0",
"success": true,
"message": "推送开始,请查看推送日志"
}
错误时返回:
{
"code": 0,
"message": ""
"error":{
errorCode:null,
errorText:null
}
"success": false,
}返回参数说明:
| 参数名 | 类型 | 说明 |
|---|---|---|
| success | bool | true 表示数据请求成功(跟code=0一致),调用者优先使用 |
| code | int | true 表示数据请求成功(跟code=0一致),调用者优先使用 |
获取推送日志
onWsPull() {
let that = this;
that.$reqWs.pull(
(res) => {
console.log(res);
// that.wsdata.push(JSON.parse(res.result));
}, {
subBeforeKey:"mapper/bridge/mkey",
ownerId: "bt",
mkey: "menu-nav",
position: "home",
}
);
},
- mkey 值为all时候,表示订阅所有信息,通常用于监控系统
推送结果

文档更新时间: 2022-03-24 09:23 作者:admin