saas_platform.md 100 KB

运维管理平台v3.0接口文档

全局说明:

何时该需要授权说明

当响应内容中 respCode 为 A0301 时,web端应重定向到登录页面,进行登录
API接口直接调用时,需先请求获取OpenId(目前为账号ID)的接口,再根据此OpenId获取token,再进行相关业务接口请求
{
    "respCode": "A0301",	//响应码
    "respMsg": "访问未授权"	//响应描述
}

网关响应码说明

"A0301", "访问未授权"
"A0135", "Method Not Allowed"
"A0340", "签名异常"

后续加入加解密异常的响应信息说明

业务响应body说明

所有接口的有效响应信息都包括respCode、respMsg两个字段,正常响应可能包含content、count等字段内容,如下所示:
{
	// 实际响应的数据体,可能是数组,也可能是对象json体,但是一个接口的响应格式是固定的,单接口要么是数组,要么是对象json体,不一定存在此content属性
    "content": {		// 单条新增数据的接口,这里的值可能代表新增记录的ID值
    	"test":"123"
    },
    "count":1,			//响应体的总数大小,分页查询时,代表总记录数大小
    "respCode": "00000",	//响应码
    "respMsg": "success"	//响应描述
}

其中respCode只有为"00000"代表成功,其余均为失败;具体失败码,所对应的描述信息会动态变化(但是每一个接口同一个失败信息对应的respCode不会改变),实际错误信息以respMsg的展示信息为准,所以这里并不给出respCode的各种定义;

是否响应成功的判断均以respCode是否为"00000"进行判断。

登录

账号登录

URL:http://develop.persagy.com/saas-platform/saas-account/saas/login
Method:POST
Header:Content-Type=application/json

请求:

{
    "appId":"PC",           //登录端,PC-电脑,APP-手机应用端,必填,作为sql条件
    "username":"zhangsan",   //账号登录名,必填
    "password":"123456",    //账号密码,必填
    "remember":false,       // 是否记住登录,true-记住,默认false,选填
    "auths":false,          // 是否获取此账号对应的菜单权限树,true-获取,默认false,选填
    "redirectUrl":"http://127.0.0.1:8080/test"  //登录成功后的重定向链接,选填;当为空时,正常登陆,否则重定向到此地址
}

返回:

header:

token: 31430ad51b0bd1ac1661697cefd0c5b1c66dd8ba382cc33392974cc138dea908.F4B702C0FE3AE2F8DCE6443B434BD26E    #格式:账号信息.token

body:

{
    "content": {
        "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号
        "accountSource": "persagy", //账号来源
        "accountType": "0",         //账号类型, 0-超级管理员(所有集团),1-单集团管理员(单集团),2-普通账号
        "appId": "PC",
        "createTime": 1615795130000,
        "groupCode": "TEST",        //集团编码
        "headPortrait": "http://127.0.0.1:8080/test.img",       //账号头像
        "id": "1371370289309515777",        //账号ID
        "lastLoginIp": "127.0.0.1",         //上次登录IP
        "lastLoginTime": 1615797523000,     //上次登录时间
        "mail": "18888888888@16a3.com",     //邮箱
        "phoneNum": "18888888888",          //手机号
        "remark": "账号备注信息",             //备注信息
        "updateTime": 1615795607000,
        "updateUser": "1371370289309515777",
        "username": "zhangsan",         //账号登录名
        "valid": 1,             //1-有效,0-无效
        "validEndTime": 1899791706000,      //账号有效期结束时间
        "validStartTime": 1615720476000,        //账号有效期开始时间
        "validLast": "0"        //账号期限限制,0-期内有效,1-永久有效
    },
    "respCode": "00000",
    "respMsg": "success"
}

记住登录

URL:http://develop.persagy.com/saas-platform/saas-account/saas/remember
Method:POST
Header:Content-Type=application/json

请求:

body:

{
    "appId":"PC",                       //登录端,PC-电脑,APP-手机应用端,必填,作为sql条件
    "username":"zhangsan",                  //账号用户名,必填
    "accountId":"AC1372371635352403969"     //账号ID,必填
}

返回:

header:

token: 31430ad51b0bd1ac1661697cefd0c5b1c66dd8ba382cc33392974cc138dea908.F4B702C0FE3AE2F8DCE6443B434BD26E    #格式:账号信息.token

body:

{
    "content": {
        "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号
        "accountSource": "persagy", //账号来源
        "accountType": "0",         //账号类型, 0-超级管理员(所有集团),1-单集团管理员(单集团),2-普通账号
        "appId": "PC",
        "createTime": 1615795130000,
        "groupCode": "TEST",        //集团编码
        "headPortrait": "http://127.0.0.1:8080/test.img",       //账号头像
        "id": "1371370289309515777",        //账号ID
        "lastLoginIp": "127.0.0.1",         //上次登录IP
        "lastLoginTime": 1615797523000,     //上次登录时间
        "mail": "18888888888@16a3.com",     //邮箱
        "phoneNum": "18888888888",          //手机号
        "remark": "账号备注信息",             //备注信息
        "updateTime": 1615795607000,
        "updateUser": "1371370289309515777",
        "username": "zhangsan",         //账号登录名
        "valid": 1,             //1-有效,0-无效
        "validEndTime": 1899791706000,      //账号有效期结束时间
        "validStartTime": 1615720476000,        //账号有效期开始时间
        "validLast": "0"        //账号期限限制,0-期内有效,1-永久有效
    },
    "respCode": "00000",
    "respMsg": "success"
}

退出登录

URL:http://develop.persagy.com/saas-platform/saas-account/account/logout
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"AC1372371635352403969"      //账号ID,必填
}

返回:

{
    "respCode": "00000",
    "respMsg": "退出成功"
}

集团管理

集团信息查询

URL:http://develop.persagy.com/saas-platform/saas-account/group/querySaasGroupList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,作为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,选填
    "groupName":"测试集团",    //集团名称,支持模糊查询,选填
    "deployModel":"0",     //集团部署方式,0-公有云,1-私有云,选填
    "syncState":"2"         //数据同步状态,0-数据同步失败,1-数据同步成功,2-未同步,选填
}

返回:

{
    "content": [
        {
            "createTime": 1615793880000,
            "deployModel": "0",
            "groupCode": "TEST",
            "groupDesc": "测试集团",
            "groupIcon": "http://127.0.0.1:9999/test.img",
            "groupName": "测试集团",
            "remark": "集团备注信息",
            "syncState": "2",
            "updateTime": 1615793880000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

查询集团项目树(权限过滤)

URL:http://develop.persagy.com/saas-platform/saas-account/group/queryGroupProjectTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,必填,作为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST"    //集团编码,选填
}

返回:

{
    "content": [
        {
            "createTime": 1616054480000,
            "deployModel": "0",
            "groupCode": "TEST",
            "groupDesc": "测试集团",            //集团描述
            "groupIcon": "http://127.0.0.1:9999/test.img",      //集团图标
            "groupName": "测试集团",            //集团名称
            "projects": [                   //下级项目集合
                {
                    "areaId": "AR1372447231903342594",
                    "createTime": 1616052043000,
                    "groupCode": "TEST",
                    "id": "PR1372447859102785538",
                    "projectId": "Pj1209010205",
                    "projectLocalId": "1209010205",
                    "projectName": "测试项目05",
                    "remark": "项目备注信息05",
                    "updateTime": 1616203558000,
                    "updateUser": "AC1372371635352403969",
                    "valid": 1
                }
            ],
            "remark": "集团备注信息",
            "syncState": "2",
            "updateTime": 1616054480000,
            "updateUser": "AC1372371635352403969",
            "valid": 1
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

创建集团信息

URL:http://develop.persagy.com/saas-platform/saas-account/group/createSaasGroup
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,必填
    "groupName":"测试集团",    //集团名称,必填
    "deployModel":"0",     //集团部署方式,0-公有云,1-私有云,选填
    "groupIcon":"http://127.0.0.1:9999/test.img",        // 集团图标,选填
    "groupDesc":"测试集团",        // 集团描述,选填
    "remark":"集团备注信息"        // 备注,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新集团信息

URL:http://develop.persagy.com/saas-platform/saas-account/group/updateSaasGroup
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,必填
    "groupName":"测试集团",    //集团名称,必填
    "deployModel":"0",     //集团部署方式,0-公有云,1-私有云,必填
    "groupIcon":"http://127.0.0.1:9999/test.img",        // 集团图标,选填
    "groupDesc":"测试集团",        // 集团描述,选填
    "remark":"集团备注信息"        // 备注,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

区域管理

查询区域树(全局)

URL:http://develop.persagy.com/saas-platform/saas-account/area/querySaasAreaTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"zhangsan",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST"   //集团编码,选填
}

返回:

{
    "content": [
        {
            "areaCode": "1001",         //区域编码
            "areaName": "一级区域-01",      //区域名称
            "areaType": "0",            //区域类别,0-非最底层区域,1-最底层区域
            "childrens": [],            //下级区域集合
            "createTime": 1615945924000,
            "groupCode": "TEST",
            "id": "AR1372002764192866305",      //区域ID
            "parentId": "",                 //上级区域ID
            "remark": "一级区域-01",            //备注
            "updateTime": 1615945924000,
            "updateUser": "zhangsan"
        },
        {
            "areaCode": "1002",
            "areaName": "一级区域-02",
            "areaType": "0",
            "childrens": [
                {
                    "areaCode": "100202",
                    "areaName": "二级区域-02",
                    "areaType": "0",
                    "childrens": [],
                    "createTime": 1615945988000,
                    "groupCode": "TEST",
                    "id": "AR1372003033744007169",
                    "parentId": "AR1372002938164207618",
                    "remark": "二级区域-02",
                    "updateTime": 1615945988000,
                    "updateUser": "zhangsan"
                },
                {
                    "areaCode": "100201",
                    "areaName": "二级区域-01",
                    "areaType": "0",
                    "childrens": [
                        {
                            "areaCode": "10020101",
                            "areaName": "三级区域-01",
                            "areaType": "1",
                            "childrens": [],
                            "createTime": 1615946017000,
                            "groupCode": "TEST",
                            "id": "AR1372003152283426817",
                            "parentId": "AR1372003069462700033",
                            "remark": "三级区域-01",
                            "updateTime": 1615946017000,
                            "updateUser": "zhangsan"
                        },
                        {
                            "areaCode": "10020102",
                            "areaName": "三级区域-02",
                            "areaType": "1",
                            "childrens": [],
                            "createTime": 1615946029000,
                            "groupCode": "TEST",
                            "id": "AR1372003203151945730",
                            "parentId": "AR1372003069462700033",
                            "remark": "三级区域-02",
                            "updateTime": 1615946029000,
                            "updateUser": "zhangsan"
                        }
                    ],
                    "createTime": 1615945997000,
                    "groupCode": "TEST",
                    "id": "AR1372003069462700033",
                    "parentId": "AR1372002938164207618",
                    "remark": "二级区域-01",
                    "updateTime": 1615945997000,
                    "updateUser": "zhangsan"
                }
            ],
            "createTime": 1615945966000,
            "groupCode": "TEST",
            "id": "AR1372002938164207618",
            "parentId": "",
            "remark": "一级区域-02",
            "updateTime": 1615945966000,
            "updateUser": "zhangsan"
        }
    ],
    "respCode": "00000",
    "respMsg": "success"
}

查询区域权限树(权限过滤)

URL:http://develop.persagy.com/saas-platform/saas-account/area/queryAllowAreaTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"zhangsan",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST"   //集团编码,选填
}

返回:

{
    "content": [
        {
            "areaCode": "1001",         //区域编码
            "areaName": "一级区域-01",      //区域名称
            "areaType": "0",            //区域类别,0-非最底层区域,1-最底层区域
            "childrens": [],            //下级区域集合
            "createTime": 1615945924000,
            "groupCode": "TEST",
            "id": "AR1372002764192866305",      //区域ID
            "parentId": "",                 //上级区域ID
            "remark": "一级区域-01",            //备注
            "updateTime": 1615945924000,
            "updateUser": "zhangsan"
        },
        {
            "areaCode": "1002",
            "areaName": "一级区域-02",
            "areaType": "0",
            "childrens": [
                {
                    "areaCode": "100202",
                    "areaName": "二级区域-02",
                    "areaType": "0",
                    "childrens": [],
                    "createTime": 1615945988000,
                    "groupCode": "TEST",
                    "id": "AR1372003033744007169",
                    "parentId": "AR1372002938164207618",
                    "remark": "二级区域-02",
                    "updateTime": 1615945988000,
                    "updateUser": "zhangsan"
                },
                {
                    "areaCode": "100201",
                    "areaName": "二级区域-01",
                    "areaType": "0",
                    "childrens": [
                        {
                            "areaCode": "10020101",
                            "areaName": "三级区域-01",
                            "areaType": "1",
                            "childrens": [],
                            "createTime": 1615946017000,
                            "groupCode": "TEST",
                            "id": "AR1372003152283426817",
                            "parentId": "AR1372003069462700033",
                            "remark": "三级区域-01",
                            "updateTime": 1615946017000,
                            "updateUser": "zhangsan"
                        }
                    ],
                    "createTime": 1615945997000,
                    "groupCode": "TEST",
                    "id": "AR1372003069462700033",
                    "parentId": "AR1372002938164207618",
                    "remark": "二级区域-01",
                    "updateTime": 1615945997000,
                    "updateUser": "zhangsan"
                }
            ],
            "createTime": 1615945966000,
            "groupCode": "TEST",
            "id": "AR1372002938164207618",
            "parentId": "",
            "remark": "一级区域-02",
            "updateTime": 1615945966000,
            "updateUser": "zhangsan"
        }
    ],
    "respCode": "00000",
    "respMsg": "success"
}

区域平铺列表查询

说明:当 isTotal 为true时,根据账号ID,做项目可见性的判断,否则为全局,不作任何数据过滤

URL:http://develop.persagy.com/saas-platform/saas-account/area/querySaasAreaList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填
    "accountId":"AC123456789",     //当前账号ID,当 isTotal 为true时,作为sql条件,否则,不做为sql条件,必填
    "groupCode":"TEST",   //集团编码,必填
    "id":"AR1372003203151945730",              //区域ID,选填
    "parentId":"100201",              //上级区域ID,选填
    "areaCode":"10020102",              //区域编码,选填
    "areaName":"三级区域-02",              //区域名称,支持模糊查询,选填
    "areaType":"1",              //区域类别,0-非最底层区域,1-最底层区域,选填
    "isTotal":true      //是否统计出该层区域及其下级所包含区域对应的所有项目数量,默认false-不统计
}

返回:

{
    "content": [
        {
            "areaCode": "10020102",
            "areaName": "三级区域-02",
            "areaType": "1",
            "createTime": 1615946029000,
            "groupCode": "TEST",
            "id": "AR1372003203151945730",
            "parentId": "100201",
            "projectNum": 0,            // 该层区域下所包含的所有的项目ID,当isTotal条件为false时,该字段不存在
            "remark": "三级区域-02",
            "updateTime": 1615946029000,
            "updateUser": "zhangsan"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

底层区域平铺列表查询(权限过滤)

URL:http://develop.persagy.com/saas-platform/saas-account/area/queryAllowSaasAreaList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填
    "accountId":"AC123456789",     //当前账号ID,必填,做为sql条件
    "groupCode":"TEST",   //集团编码,必填
    "id":"AR1372003203151945730",              //区域ID,选填
    "parentId":"100201",              //上级区域ID,选填
    "areaCode":"10020102",              //区域编码,选填
    "areaName":"三级区域-02",              //区域名称,支持模糊查询,选填
    "areaType":"1",              //区域类别,0-非最底层区域,1-最底层区域,选填
    "isTotal":true      //是否统计出该层区域下,所有项目的数量,默认false-不统计
}

返回:

{
    "content": [
        {
            "areaCode": "10020102",
            "areaName": "三级区域-02",
            "areaType": "1",
            "createTime": 1615946029000,
            "groupCode": "TEST",
            "id": "AR1372003203151945730",
            "parentId": "100201",
            "projectNum": 0,            // 该层区域下所包含的所有的项目ID,当isTotal条件为false时,该字段不存在
            "remark": "三级区域-02",
            "updateTime": 1615946029000,
            "updateUser": "zhangsan"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

创建区域信息

URL:http://develop.persagy.com/saas-platform/saas-account/area/createSaasArea
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填,不做为sql条件
    "accountId":"AC1372001812832444418",     //当前账号ID,必填,作为sql条件
    "groupCode":"TEST",   //集团编码,必填
    "parentId":"",              //上级区域ID,选填
    "areaCode":"1001",              //区域编码,选填
    "areaName":"一级区域",              //区域名称,必填
    "areaType":"0",              //区域类别,0-非最底层区域,1-最底层区域,必填
    "remark":"一级区域"             //备注,选填
}

返回:

{
    "content": "AR1372001812832444418",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新区域信息

URL:http://develop.persagy.com/saas-platform/saas-account/area/updateSaasArea
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填,不做为sql条件
    "accountId":"AC1372001812832444418",     //当前账号ID,必填,不做为sql条件
    "id":"AR1372001812832444418",    //区域ID,必填
    "groupCode":"TEST",   //集团编码,必填
    "parentId":"",              //上级区域ID,选填
    "areaCode":"1001",              //区域编码,选填
    "areaName":"一级区域",              //区域名称,必填
    "areaType":"0",              //区域类别,0-非最底层区域,1-最底层区域,必填
    "remark":"一级区域"             //备注,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

删除区域信息

URL:http://develop.persagy.com/saas-platform/saas-account/area/deleteSaasArea
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填,不做为sql条件
    "accountId":"AC1372001812832444418",     //当前账号ID,必填,做为sql条件
    "groupCode":"TEST",   //集团编码,必填
    "id":"AR1372001812832444418"            //区域ID,必填
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

项目管理

查询项目信息

URL:http://develop.persagy.com/saas-platform/saas-account/project/querySaasProjectList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"1371367185138696194",      //主键ID,选填
    "accountId":"1371370289309515777",     //当前账号ID,必填,作为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,选填
    "projectId":"Pj1209010205",    //项目ID,选填
    "projectIds":[               //项目ID集合,选填
        "Pj1209010205"
    ],   
    "areaId":"123",     //区域ID,选填
    "projectLocalId":"1209010205",         //项目本地编码,选填
    "projectName":"测试项目"    //项目名称,支持模糊查询,选填
}

返回:

{
    "content": [
        {
            "areaId": "123",
            "areaName": "测试区域",
            "createTime": 1615794390000,
            "groupCode": "TEST",
            "id": "1371367185138696194",
            "projectId": "Pj1209010205",
            "projectLocalId": "1209010205",
            "projectName": "测试项目",
            "remark": "项目备注信息",
            "updateTime": 1615794390000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

集团-区域项目平铺列表查询

说明:接口返回数据会包括,被分配的最后一级区域信息,以及被分配的项目信息,均平铺返回

URL:http://develop.persagy.com/saas-platform/saas-account/project/queryGroupProjectList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,选填,不做为sql条件
    "groupCode":"TEST",    //集团编码,选填
    "accountId":"1371370289309515777",     //当前账号ID,必填,作为sql条件
    "appId":"PC"        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,选填,不做为sql条件
}

返回:

{
    "content": {[
        {
            "areaId": "123",
            "areaName": "测试区域",
            "createTime": 1615794390000,
            "groupCode": "TEST",
            "id": "1371367185138696194",
            "projectId": "Pj1209010205",
            "projectLocalId": "1209010205",
            "projectName": "测试项目",
            "remark": "项目备注信息",
            "updateTime": 1615794390000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "respCode": "00000",
    "respMsg": "success"
}

查询集团区域项目树(全局)

结构:集团->区域->项目,此接口未根据账号ID做数据可见性的范围限制,返回信息为全局信息

URL:http://develop.persagy.com/saas-platform/saas-account/project/queryAreaProjectTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"1371367185138696194",      //主键ID,选填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,选填
    "projectId":"Pj1209010205",    //项目ID,选填
    "areaId":"123",     //区域ID,选填
    "projectLocalId":"1209010205",         //项目本地编码,选填
    "projectName":"测试项目"    //项目名称,支持模糊查询,选填
}

返回:

{
    "content": [
        {
            "areas": [      //集团下区域集合
                {
                    "areaCode": "1001",         //区域编码
                    "areaName": "一级区域-01",      //区域名称
                    "areaType": "0",            //区域类别,0-非最底层区域,1-最底层区域
                    "childrens": [],        //下级区域集合
                    "createTime": 1615945924000,
                    "groupCode": "TEST",
                    "id": "AR1372002764192866305",      //区域ID
                    "parentId": "",         //上级区域ID
                    "remark": "一级区域-01",
                    "updateTime": 1615945924000,
                    "updateUser": "zhangsan"
                },
                {
                    "areaCode": "1002",
                    "areaName": "一级区域-02",
                    "areaType": "0",
                    "childrens": [
                        {
                            "areaCode": "100202",
                            "areaName": "二级区域-02",
                            "areaType": "0",
                            "childrens": [],
                            "createTime": 1615945988000,
                            "groupCode": "TEST",
                            "id": "AR1372003033744007169",
                            "parentId": "AR1372002938164207618",
                            "remark": "二级区域-02",
                            "updateTime": 1615945988000,
                            "updateUser": "zhangsan"
                        },
                        {
                            "areaCode": "100201",
                            "areaName": "二级区域-01",
                            "areaType": "0",
                            "childrens": [
                                {
                                    "areaCode": "10020101",
                                    "areaName": "三级区域-01",
                                    "areaType": "1",
                                    "childrens": [],
                                    "createTime": 1615946017000,
                                    "groupCode": "TEST",
                                    "id": "AR1372003152283426817",
                                    "parentId": "AR1372003069462700033",
                                    "projects": [                       // 区域下项目集合信息
                                        {
                                            "areaId": "AR1372003152283426817",
                                            "createTime": 1615794390000,
                                            "groupCode": "TEST",
                                            "id": "1371367185138696194",
                                            "projectId": "Pj1209010205",
                                            "projectLocalId": "1209010205",
                                            "projectName": "测试项目",
                                            "remark": "项目备注信息",
                                            "updateTime": 1615794697000,
                                            "updateUser": "zhangsan",
                                            "valid": 1
                                        }
                                    ],
                                    "remark": "三级区域-01",
                                    "updateTime": 1615946017000,
                                    "updateUser": "zhangsan"
                                },
                                {
                                    "areaCode": "10020102",
                                    "areaName": "三级区域-02",
                                    "areaType": "1",
                                    "childrens": [],
                                    "createTime": 1615946029000,
                                    "groupCode": "TEST",
                                    "id": "AR1372003203151945730",
                                    "parentId": "AR1372003069462700033",
                                    "projects": [],
                                    "remark": "三级区域-02",
                                    "updateTime": 1615946029000,
                                    "updateUser": "zhangsan"
                                }
                            ],
                            "createTime": 1615945997000,
                            "groupCode": "TEST",
                            "id": "AR1372003069462700033",
                            "parentId": "AR1372002938164207618",
                            "remark": "二级区域-01",
                            "updateTime": 1615945997000,
                            "updateUser": "zhangsan"
                        }
                    ],
                    "createTime": 1615945966000,
                    "groupCode": "TEST",
                    "id": "AR1372002938164207618",
                    "parentId": "",
                    "remark": "一级区域-02",
                    "updateTime": 1615945966000,
                    "updateUser": "zhangsan"
                }
            ],
            "createTime": 1615793880000,
            "deployModel": "0",             //集团部署方式,0-公有云,1-私有云
            "groupCode": "TEST",        //集团编码
            "groupDesc": "测试集团",        //集团描述
            "groupIcon": "http://127.0.0.1:9999/test.img",
            "groupName": "测试集团",        //集团名称
            "remark": "集团备注信息",
            "syncState": "2",           //数据同步状态,0-数据同步失败,1-数据同步成功,2-未同步
            "updateTime": 1615794207000,
            "updateUser": "zhangsan",
            "valid": 1
        }
    ],
    "respCode": "00000",
    "respMsg": "success"
}

查询集团区域项目树(权限过滤)

结构:集团->区域->项目,根据账号ID,做数据权限过滤,且会剔除不存在项目信息的区域

URL:http://develop.persagy.com/saas-platform/saas-account/project/queryAllowAreaProjectTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",		//账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1375000220760301569",     //当前账号ID,必填,作为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"PUTONG",    //集团编码,选填
    "id":"PR1375797952055988226",      //主键ID,选填
    "projectId":"Pj1209010205",    //项目ID,选填
    "projectIds":[                  //项目ID集合,选填
        "Pj1209010205"
    ],
    "areaId":"AR1375797850927124484",     //区域ID,选填
    "projectLocalId":"1209010205",         //项目本地编码,选填
    "projectName":"项目",    	//项目名称,支持模糊查询,选填
    "showEmptyArea":false		// 是否展示空的区域信息,即不存在项目的空区域,默认true-展示
}

返回:

{
    "content": [
        {
            "areas": [
                {
                    "areaCode": "",
                    "areaName": "分区1",
                    "areaType": "0",	//0-非底层区域,1-底层区域
                    "childrens": [		//下级分区信息集合
                        {
                            "areaCode": "",
                            "areaName": "分区1-下级",
                            "areaType": "1",
                            "childrens": [],
                            "createTime": 1616850743000,
                            "groupCode": "PUTONG",
                            "id": "AR1375797850927124484",
                            "parentId": "AR1375797850927124482",
                            "projects": [			//该区域对应的项目集合信息
                                {
                                    "areaId": "AR1375797850927124484",
                                    "areaName": "分区1-下级",
                                    "createTime": 1616774400000,
                                    "groupCode": "PUTONG",
                                    "id": "PR1375797952055988226",
                                    "projectId": "Pj1209010205",
                                    "projectLocalId": "1209010205",
                                    "projectName": "项目一",
                                    "updateTime": 1616774400000,
                                    "updateUser": "AC1375000220760301569",
                                    "valid": 1
                                }
                            ],
                            "updateTime": 1616850743000,
                            "updateUser": "AC1375000220760301569"
                        }
                    ],
                    "createTime": 1616850743000,
                    "groupCode": "PUTONG",
                    "id": "AR1375797850927124482",
                    "updateTime": 1616850743000,
                    "updateUser": "AC1375000220760301569"
                }
            ],
            "createTime": 1616908347000,
            "groupCode": "PUTONG",
            "groupName": "其他权限集团",
            "syncState": "2",
            "updateTime": 1616908347000,
            "updateUser": "AC1372371635352403969",
            "valid": 1
        }
    ]
    "respCode": "00000",
    "respMsg": "success"
}

分页查询项目信息

URL:http://develop.persagy.com/saas-platform/saas-account/project/queryProjectPageList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"1371367185138696194",      //主键ID,选填
    "accountId":"1371370289309515777",     //当前账号ID,必填,作为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,选填
    "projectId":"Pj1209010205",    //项目ID,选填
    "areaId":"123",     //区域ID,选填
    "projectLocalId":"1209010205",         //项目本地编码,选填
    "projectName":"测试项目",    //项目名称,支持模糊查询,选填
    "page":1,       //分页页码,不可低于1,必填
    "size":10       //分页大小,不可低于1,必填
}

返回:

{
    "content": [
        {
            "areaId": "123",
            "areaName": "测试区域",
            "createTime": 1615794390000,
            "groupCode": "TEST",
            "id": "1371367185138696194",
            "projectId": "Pj1209010205",
            "projectLocalId": "1209010205",
            "projectName": "测试项目",
            "remark": "项目备注信息",
            "updateTime": 1615794390000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "count": 1,         //总记录数大小
    "respCode": "00000",
    "respMsg": "success"
}

创建项目信息

URL:http://develop.persagy.com/saas-platform/saas-account/project/createSaasProject
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,必填
    "projectId":"Pj1209010205",    //项目ID,必填
    "areaId":"123",     //区域ID,选填
    "projectLocalId":"1209010205",         //项目本地编码,必填
    "projectName":"测试项目",    //项目名称,必填
    "remark":"项目备注信息"    //备注,选填
}

返回:

{
    "content": "PR1371761303924879361",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新项目信息

URL:http://develop.persagy.com/saas-platform/saas-account/project/updateSaasProject
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"1371367185138696194",      //主键ID,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,必填
    "projectId":"Pj1209010205",    //项目ID,必填
    "areaId":"123",     //区域ID,选填
    "projectLocalId":"1209010205",         //项目本地编码,必填
    "projectName":"测试项目",    //项目名称,必填
    "remark":"项目备注信息"    //备注,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

批量变更项目所属区域

URL:http://develop.persagy.com/saas-platform/saas-account/project/batchUpdateProjectArea
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST",    //集团编码,必填
    "areaId":"AR1372447231903342594",     //区域ID,必填
    "projectIds": [     //项目ID集合,必填
        "Pj1209010207"
    ]
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

账号管理

查询账号信息

URL:http://develop.persagy.com/saas-platform/saas-account/account/querySaasAccountList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,选填
    "groupCode":"TEST",    //集团编码,选填
    "accountId":"1371370289309515777",     //当前账号ID,选填
    "accountType":"0",          //账号类型, 0-超级管理员(所有集团),1-单集团管理员(单集团),2-普通账号,选填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,选填
    "username":"zhangsan",     //登录用户名,支持模糊查询,选填
    "phoneNum":"18888888888",         //手机号,选填
    "accountSource":"persagy"        //账号来源,选填
}

返回:

{
    "content": [
        {
            "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号
            "accountSource": "persagy",
            "accountType": "0",
            "appId": "PC",
            "createTime": 1615795130000,
            "validEndTime": 1899791706000,
            "groupCode": "TEST",
            "headPortrait": "http://127.0.0.1:8080/test.img",
            "id": "1371370289309515777",
            "mail": "18888888888@163.com",
            "password": "123456",
            "phoneNum": "18888888888",
            "remark": "remark",
            "updateTime": 1615795130000,
            "username": "zhangsan",
            "valid": 1,
            "validStartTime": 1615720476000
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

查询角色账号信息

URL:http://develop.persagy.com/saas-platform/saas-account/account/queryRoleAccountList
Method:POST
Header:Content-Type=application/json

请求:

{
    "groupCode":"WD",    //集团编码,必填
    "roleId":"RO1372505156457959327",          //角色ID,必填
    "valid":1         //是否可用,0-不可用,1-可用,选填
}

返回:

{
    "content": [
        {
            "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号
            "accountSource": "persagy",
            "accountType": "0",
            "appId": "PC",
            "createTime": 1615795130000,
            "validEndTime": 1899791706000,
            "groupCode": "TEST",
            "headPortrait": "http://127.0.0.1:8080/test.img",
            "id": "1371370289309515777",
            "mail": "18888888888@163.com",
            "password": "123456",
            "phoneNum": "18888888888",
            "remark": "remark",
            "updateTime": 1615795130000,
            "username": "zhangsan",
            "valid": 1,
            "validStartTime": 1615720476000
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

分页查询账号信息

URL:http://develop.persagy.com/saas-platform/saas-account/account/queryAccountPageList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,选填
    "groupCode":"sybs",    //集团编码,选填
    "accountId":"AC1377819021444931585",     //当前账号ID,选填,会作为sql条件
    "accountType":"0",          //账号类型, 0-超级管理员(所有集团),1-单集团管理员(单集团),2-普通账号,选填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,选填
    "username":"sybs",     //登录用户名,支持模糊查询,选填
    "phoneNum":"18888888888",         //手机号,选填
    "accountSource":"persagy",        //账号来源,选填
    "showRoles":true,   // 是否显示roles,true-显示,默认false
    "showGroup":true,   //是否显示集团信息,true-显示,默认false
    "page":1,       //分页页码,不可低于1,必填
    "size":10       //分页大小,不可低于1,必填
}

返回:

{
    "content": [
        {
            "accountBelong": "1",
            "accountSource": "persagy",
            "accountType": "1",
            "appId": "PC",
            "createTime": 1617292800000,
            "groupCode": "sybs",
            "groupName": "啥也不是",
            "id": "AC1377819021444931585",
            "lastLoginIp": "127.0.0.1",
            "lastLoginTime": 1617292800000,
            "roles": [
                {
                    "groupCode": "sybs",
                    "id": "RO1377815673866051586",
                    "remark": "自动创建默认业务超管角色",
                    "roleCode": "1001",
                    "roleName": "业务超管默认角色",
                    "roleType": "2"
                }
            ],
            "updateTime": 1617292800000,
            "updateUser": "AC1372371635352403969",
            "username": "sybs",
            "valid": 1,         //是否可用,0-不可用,1-可用
            "validEndTime": 1924876800000,
            "validLast": "0",           // 账号有效期,0-期内有效,1-永久有效
            "validStartTime": 1609344000000
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

根据账号名称查询账号信息

URL:http://develop.persagy.com/saas-platform/saas-account/account/querySaasAccountByUsername
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "groupCode":"TEST",    //集团编码,必填
    "username":"zhangsan",     //登录用户名,必填
}

返回:

{
    "content": [
        {
            "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号
            "accountSource": "persagy",
            "accountType": "0",
            "appId": "PC",
            "createTime": 1615795130000,
            "validEndTime": 1899791706000,
            "groupCode": "TEST",
            "headPortrait": "http://127.0.0.1:8080/test.img",
            "id": "1371370289309515777",
            "mail": "18888888888@163.com",
            "password": "123456",
            "phoneNum": "18888888888",
            "remark": "remark",
            "updateTime": 1615795130000,
            "username": "zhangsan",
            "valid": 1,
            "validStartTime": 1615720476000
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

创建账号信息

URL:http://develop.persagy.com/saas-platform/saas-account/account/createSaasAccount
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "groupCode":"TEST",    //集团编码,选填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "username":"zhangsan",     //登录用户名,必填
    "password":"123456",        //登录密码,不填,默认123456
    "phoneNum":"18888888888",         //手机号,选填
    "mail":"18888888888@163.com",         //邮箱,选填
    "headPortrait":"http://127.0.0.1:8080/test.img",      //头像,图片URL,选填
    "accountType":"0",          //账号类型, 0-超级管理员(所有集团),1-单集团管理员(单集团),2-普通账号,必填
    "accountSource":"persagy",     //账号来源,必填
    "validStartTime":1615720476050,     // 账号有效期的开始时间,时间戳格式,选填
    "validEndTime":1899791706000,       // 账号有效期的结束时间,时间戳格式,选填
    "validLast":"0",        //账号有效期,0-期内有效,1-永久有效,当为0时,validStartTime 和 validEndTime 必填
    "remark":"remark",        //备注,选填
    "valid":"1",            // 是否可用,0-不可用,1-可用,选填,默认为1
    "casType":"0"          //关联类型,0-主岗,1-副岗,2-业务超管默认角色,这里的关联类型,会作为重置的条件,进行删除数据的依据,选填
    "roles":[               // 账号关联的角色,会先删除此账号对应的角色信息,再添加,选填
        {
            "roleId":"RO0134568781001"     //角色ID
        }
    ]
}

返回:

{
    "content": "AC1371761303924879361",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新账号信息

URL:http://develop.persagy.com/saas-platform/saas-account/account/updateSaasAccount
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //账号ID,必填
    "groupCode":"TEST",    //集团编码,选填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "username":"zhangsan",     //登录用户名,必填
    "password":"123456",        //登录密码,不填,默认123456
    "phoneNum":"18888888888",         //手机号,选填
    "mail":"18888888888@163.com",         //邮箱,选填
    "headPortrait":"http://127.0.0.1:8080/test.img",      //头像,图片URL,选填
    "accountType":"0",          //账号类型, 0-超级管理员(所有集团),1-单集团管理员(单集团),2-普通账号,必填
    "accountSource":"persagy",     //账号来源,必填
    "validStartTime":1615720476050,     // 账号有效期的开始时间,时间戳格式,选填
    "validEndTime":1899791706000,       // 账号有效期的结束时间,时间戳格式,选填
    "validLast":"0",        //账号有效期,0-期内有效,1-永久有效;当为0时,validStartTime 和 validEndTime 必填
    "remark":"账号备注信息",        //备注,选填
    "valid":"1",            // 是否可用,0-不可用,1-可用,必填
    "casType":"0"          //关联类型,0-主岗,1-副岗,2-业务超管默认角色,这里的关联类型,会作为重置的条件,进行删除数据的依据,选填
    "roles":[               // 账号关联的角色,会先删除此账号对应的角色信息,再添加,选填
        {
            "roleId":"RO0134568781001"     //角色ID
        }
    ]
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

集团关联业务超管账号

URL:http://develop.persagy.com/saas-platform/saas-account/account/addSaasAccountGroup
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1371370289309515777",     //账号ID,必填,注意这里是关联着的账号ID,而非登录着的账号ID
    "groupCode":"TEST",    //集团编码,必填
    "appId":"PC"        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填,目前不作为sql条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "关联成功"
}

禁用账号

URL:http://develop.persagy.com/saas-platform/saas-account/account/deleteSaasAccount
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //账号ID,必填
    "groupCode":"TEST",    //集团编码,必填
    "appId":"PC"        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,目前不作为sql条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "禁用成功"
}

启用账号

URL:http://develop.persagy.com/saas-platform/saas-account/account/enableSaasAccount
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //账号ID,必填
    "groupCode":"TEST",    //集团编码,必填
    "appId":"PC"        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,目前不作为sql条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "启用成功"
}

修改密码

URL:http://develop.persagy.com/saas-platform/saas-account/account/updateAccountPwd
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //账号ID,必填,作为sql条件
    "groupCode":"TEST",    //集团编码,选填
    "appId":"PC",        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,目前不作为sql条件
    "oldPassword":"123456",     //账号旧密码,不可为空
    "newPassword":"123456"      //账号新密码,不可为空
}

返回:

{
    "respCode": "00000",
    "respMsg": "密码修改成功"
}

重置密码

URL:http://develop.persagy.com/saas-platform/saas-account/account/resetAccountPwd
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //账号ID,必填,作为sql条件
    "groupCode":"TEST",    //集团编码,选填
    "appId":"PC"        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,目前不作为sql条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "密码重置成功"
}

产品管理

查询产品信息

URL:http://develop.persagy.com/saas-platform/saas-account/product/querySaasProductList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"AC68464684542455",     // 账号ID,必填,不做为sql条件
    "appId":"PC",                   // 应用ID,PC-电脑,APP-手机应用,必填,不做为sql条件
    "productCode":"1001",           // 产品编码,选填,唯一
    "productName":"测试",           // 产品名称,选填,唯一
    "productState":"0",         // 产品状态,0-建设中,1-已完成,2-已关联,选填
    "productMenu":"0"          // 产品是否关联菜单,0-未关联,1-已关联,选填
}

返回:

{
    "content": [
        {
            "createTime": 1619519546000,
            "id": "PD1386991620691402753",
            "productCode": "1001",
            "productIcon": "layui-test-icon",
            "productMenu": "0",
            "productName": "测试",
            "productState": "0",
            "remark": "测试但是",
            "updateTime": 1619519710000,
            "updateUser": "AC68464684542455"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

分页查询产品信息

URL:http://develop.persagy.com/saas-platform/saas-account/product/queryProductPageList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"AC68464684542455",     // 账号ID,必填,不做为sql条件
    "appId":"PC",                   // 应用ID,PC-电脑,APP-手机应用,必填,不做为sql条件
    "productCode":"1001",           // 产品编码,选填,唯一
    "productName":"测试",           // 产品名称,选填,唯一
    "productState":"0",         // 产品状态,0-建设中,1-已完成,2-已关联,选填
    "productMenu":"0",          // 产品是否关联菜单,0-未关联,1-已关联,选填
    "page":1,       //分页页码,不可低于1,必填
    "size":10       //分页大小,不可低于1,必填
}

返回:

{
    "content": [
        {
            "createTime": 1619519546000,
            "id": "PD1386991620691402753",
            "productCode": "1001",
            "productIcon": "layui-test-icon",
            "productMenu": "0",
            "productName": "测试",
            "productState": "0",
            "remark": "测试但是",
            "updateTime": 1619519710000,
            "updateUser": "AC68464684542455"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

新增产品信息

URL:http://develop.persagy.com/saas-platform/saas-account/product/querySaasAccountList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"AC68464684542455",     // 账号ID,必填,不做为sql条件
    "appId":"PC",                   // 应用ID,PC-电脑,APP-手机应用,必填
    "productCode":"1001",           // 产品编码,必填,唯一
    "productName":"测试",           // 产品名称,必填,唯一
    "productIcon":"layui-test-icon",   // 产品图标,必填
    "productState":"0",         // 产品状态,0-建设中,1-已完成,2-已关联,必填
    "productMenu":"0",          // 产品是否关联菜单,0-未关联,1-已关联,必填
    "remark":"测试"             //备注,选填
}

返回:

{
    "content": "PD1386991620691402753",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新产品信息

URL:http://develop.persagy.com/saas-platform/saas-account/product/querySaasAccountList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"AC68464684542455",     // 账号ID,必填,不做为sql条件
    "appId":"PC",                   // 应用ID,PC-电脑,APP-手机应用,必填
    "id":"PD1386991620691402753",        //产品ID,必填
    "productCode":"1001",           // 产品编码,必填,唯一
    "productName":"测试",           // 产品名称,必填,唯一
    "productIcon":"layui-test-icon",   // 产品图标,必填
    "productState":"0",         // 产品状态,0-建设中,1-已完成,2-已关联,必填
    "productMenu":"0",          // 产品是否关联菜单,0-未关联,1-已关联,必填
    "remark":"测试但是"             //备注,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

角色管理

查询角色信息(未做权限过滤,全局角色列表)

URL:http://develop.persagy.com/saas-platform/saas-account/role/querySaasRoleList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "groupCode":"TEST",    //集团编码,选填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "id":"RO1371755195843821569",            //角色ID, 选填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "roleCode":"1001",  //角色编码,选填
    "roleType":"0",     // 角色类型,0-系统角色,1-业务角色
    "roleName":"测试",  //角色名称,支持模糊查询,选填
    "counMenu":true,   //是否统计菜单数量,true-统计,默认false
    "countFunction":true,   //是否统计功能点数量,true-统计,默认false
    "roleIds":[     //角色ID集合,选填
        "RO1371755195843821569"
    ]
}

返回:

{
    "content": [
        {
            "countFunction": 0,         // 当参数 countFunction 为 true时存在,代表此角色下所拥有的功能点的数量
            "counMenu":0,       // 当参数 counMenu 为 true时存在,代表此角色下所拥有的菜单的数量
            "createTime": 1615886899000,
            "groupCode": "TEST",
            "id": "RO1371755195843821569",
            "remark": "角色备注信息",
            "roleCode": "1001",
            "roleType":"0",
            "roleName": "测试角色",
            "updateTime": 1615887053000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

分页查询角色信息(未做权限过滤,全局角色列表)

URL:http://develop.persagy.com/saas-platform/saas-account/role/queryRolePageList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"RO1371755195843821569",            //角色ID, 选填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "roleCode":"1001",  //角色编码,选填
    "roleType":"0",     // 角色类型,0-系统角色,1-业务角色,选填
    "roleTypes":["0"],  // 角色类型集合,选填
    "roleName":"测试",  //角色名称,支持模糊查询,选填
    "groupCode":"TEST",    //集团编码,必填
    "counMenu":true,   //是否统计菜单数量,true-统计,默认false
    "countFunction":true,   //是否统计功能点数量,true-统计,默认false
    "adminOrder":true,  // 是否按照超级管理员第一位,其余账号顺延的规则排序
    "page":1,       //分页页码,不可低于1,必填
    "size":10       //分页大小,不可低于1,必填
}

返回:

{
    "content": [
        {
            "countFunction": 0,         // 当参数 countFunction 为 true时存在,代表此角色下所拥有的功能点的数量
            "counMenu":0,       // 当参数 counMenu 为 true时存在,代表此角色下所拥有的菜单的数量
            "createTime": 1615886899000,
            "groupCode": "TEST",
            "id": "RO1371755195843821569",
            "remark": "角色备注信息",
            "roleCode": "1001",
            "roleType":"0",
            "roleName": "测试角色",
            "updateTime": 1615887053000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "count": 1,             //总记录数大小
    "respCode": "00000",
    "respMsg": "success"
}

根据角色名称查询角色信息

URL:http://develop.persagy.com/saas-platform/saas-account/role/querySaasRoleByName
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",         //集团编码,必填
    "roleName":"测试",           //角色名称,必填
    "roleType":"0",           //角色类型,业务使用时必填
}

返回:

{
    "content": [
        {
            "createTime": 1615886899000,
            "groupCode": "TEST",
            "id": "RO1371755195843821569",
            "remark": "角色备注信息",
            "roleCode": "1001",
            "roleType":"0",
            "roleName": "测试角色",
            "updateTime": 1615887053000,
            "updateUser": "1371370289309515777",
            "valid": 1
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

创建角色信息

URL:http://develop.persagy.com/saas-platform/saas-account/role/createSaasRole
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleCode":"1001",  //角色编码,必填
    "roleType":"0",     // 角色类型,0-系统角色,1-业务角色,默认0
    "roleName":"测试角色",  //角色名称,必填
    "remark":"角色备注信息",       //备注,选填
    "auths": [              //菜单功能集合,选填
        {
            "menuId":"1371376123917754369",       //菜单ID,必填
            "functionId":"1371376123917754369"       //功能ID,选填
        },
        {
            "menuId":"1371376123917754369",       //菜单ID,必填
            "functionId":"1371376123917754380"       //功能ID,选填
        }
    ]
}

返回:

{
    "content": "RO1371761303924879361",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新角色信息

URL:http://develop.persagy.com/saas-platform/saas-account/role/updateSaasRole
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"RO1371755195843821569",          //角色ID,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleCode":"1001",  //角色编码,必填
    "roleType":"0",     // 角色类型,0-系统角色,1-业务角色
    "roleName":"测试角色",  //角色名称,必填
    "remark":"角色备注信息",       //备注,选填
    "auths": [              //菜单功能集合,选填
        {
            "menuId":"1371376123917754369",       //菜单ID,必填
            "functionId":"1371376123917754369"       //功能ID,选填
        },
        {
            "menuId":"1371376123917754369",       //菜单ID,必填
            "functionId":"1371376123917754380"       //功能ID,选填
        }
    ]
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

删除角色信息

级联删除账号和角色的关联关系,以及角色和菜单的关联关系

URL:http://develop.persagy.com/saas-platform/saas-account/role/deleteSaasRole
Method:POST
Header:Content-Type=application/json

请求:

{
    "id":"RO1372505156457959425",        //角色ID,必填
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST"    //集团编码,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

菜单管理

查询菜单功能树(不做权限过滤)

URL:http://develop.persagy.com/saas-platform/saas-account/menu/queryMenuFunTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,做为sql条件
    "menuId":"ME1372505574210637825",       //菜单ID,选填
    "menuType":"0"      //菜单类型,0-系统菜单,1-标准业务菜单,2-IBMS菜单,必填
}

返回:

{
    "content": [
        {
            "appId": "PC",
            "childrens": [],
            "createTime": 1617335946000,
            "functions": [
                {
                    "createTime": 1617335946000,
                    "funCode": "1001",
                    "funName": "新增集团信息",
                    "funSort": 1,
                    "funUrl": "/group/createSaasGroup",
                    "id": "FU1372509049900339201",
                    "menuId": "ME1372505574210637825",
                    "remark": "新增集团信息",
                    "updateTime": 1617335946000,
                    "updateUser": "AC1372371635352403969"
                },
                {
                    "createTime": 1617335946000,
                    "funCode": "1005",
                    "funName": "新增项目信息",
                    "funSort": 4,
                    "funUrl": "/project/createSaasProject",
                    "id": "FU1372509049900339202",
                    "menuId": "ME1372505574210637825",
                    "remark": "新增项目信息",
                    "updateTime": 1617335946000,
                    "updateUser": "AC1372371635352403969"
                },
                {
                    "createTime": 1617335946000,
                    "funCode": "1003",
                    "funName": "修改集团信息",
                    "funSort": 2,
                    "funUrl": "/group/updateSaasGroup",
                    "id": "FU1372509217085296641",
                    "menuId": "ME1372505574210637825",
                    "remark": "修改集团信息",
                    "updateTime": 1617335946000,
                    "updateUser": "AC1372371635352403969"
                },
                {
                    "createTime": 1617335946000,
                    "funCode": "1007",
                    "funName": "修改项目信息",
                    "funSort": 5,
                    "funUrl": "/project/updateSaasProject",
                    "id": "FU1372509217085296642",
                    "menuId": "ME1372505574210637825",
                    "remark": "修改项目信息",
                    "updateTime": 1617335946000,
                    "updateUser": "AC1372371635352403969"
                },
                {
                    "createTime": 1617335946000,
                    "funCode": "1004",
                    "funName": "查询集团列表信息",
                    "funSort": 3,
                    "funUrl": "/project/querySaasGroupList",
                    "id": "FU1372509383896961026",
                    "menuId": "ME1372505574210637825",
                    "remark": "查询集团列表信息",
                    "updateTime": 1617335946000,
                    "updateUser": "AC1372371635352403969"
                }
            ],
            "id": "ME1372505574210637825",
            "menuCode": "1001",
            "menuId": "ME1372505574210637825",
            "menuName": "集团项目管理",
            "menuSort": 1,
            "menuType": "0",
            "menuUrl": "/oms/groupAndProjectManagement/",
            "parentId": "",
            "remark": "集团项目管理",
            "updateTime": 1617335946000,
            "updateUser": "AC1372371635352403969",
            "urlType": "0"
        }
    ],
    "respCode": "00000",
    "respMsg": "success"
}

查询账号菜单功能权限树(权限过滤)

URL:http://develop.persagy.com/saas-platform/saas-account/menu/querySaasMenuTree
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "isMenu":false,     //是否仅查询出菜单树,true-是,默认false
    "groupCode":"TEST"    //集团编码,选填

}

返回:

{
    "content": [
        {
            "accountId": "1371370289309515777",
            "appId": "PC",
            "childrens": [      //下级菜单
                {
                    "accountId": "1371370289309515777",
                    "appId": "PC",
                    "childrens": [
                        {
                            "accountId": "1371370289309515777",
                            "appId": "PC",
                            "childrens": [],
                            "functions": [          // 此菜单所对应的功能点集合
                                {
                                    "funCode": "1001010101",            //功能编码
                                    "funName": "查询",        
                                    "funSort": 1,                           // 功能顺序
                                    "funUrl": "/account/querySaasAccountList",      //功能URL
                                    "groupCode": "TEST",
                                    "id": "FU1371634297690148866",          //功能ID
                                    "menuId": "1371376123917754369",        //菜单ID
                                    "remark": "功能点备注信息"
                                },
                                {
                                    "funCode": "1001010102",
                                    "funName": "删除",
                                    "funSort": 2,
                                    "funUrl": "/account/deleteSaasAccount",
                                    "groupCode": "TEST",
                                    "id": "FU1371635736550330370",
                                    "menuId": "1371376123917754369",
                                    "remark": "功能点备注信息"
                                }
                            ],
                            "groupCode": "TEST",
                            "menuCode": "10010101",     //菜单编码
                            "menuIcon": "layui-icon",       //菜单图标
                            "menuId": "1371376123917754369",    //菜单ID
                            "menuName": "三级-01菜单",      //菜单名称
                            "menuSort": 1,              //菜单顺序
                            "menuUrl": "/account/querySaasAccountList",     //菜单URL,根据此值的有无,判断是否为落地页
                            "urlType":"0",              //URL类型,0-相对路径,1-绝对路径
                            "parentId": "1371375937187340290",          //上级菜单ID
                            "remark": "三级-01菜单备注"
                        },
                        {
                            "accountId": "1371370289309515777",
                            "appId": "PC",
                            "childrens": [],
                            "functions": [],
                            "groupCode": "TEST",
                            "menuCode": "10010102",
                            "menuIcon": "layui-icon",
                            "menuId": "1371376152736817154",
                            "menuName": "三级-02菜单",
                            "menuSort": 2,
                            "menuUrl": "/account/querySaasAccountList",
                            "urlType":"",
                            "parentId": "1371375937187340290",
                            "remark": "三级-02菜单备注"
                        }
                    ],
                    "groupCode": "TEST",
                    "menuCode": "100101",
                    "menuIcon": "layui-icon",
                    "menuId": "1371375937187340290",
                    "menuName": "二级-01菜单",
                    "menuSort": 1,
                    "menuUrl": "",
                    "urlType":"",
                    "parentId": "1371375808132800514",
                    "remark": "二级-01菜单备注"
                },
                {
                    "accountId": "1371370289309515777",
                    "appId": "PC",
                    "childrens": [],
                    "groupCode": "TEST",
                    "menuCode": "100102",
                    "menuIcon": "layui-icon",
                    "menuId": "1371375968732700673",
                    "menuName": "二级-02菜单",
                    "menuSort": 2,
                    "menuUrl": "",
                    "parentId": "1371375808132800514",
                    "remark": "二级-02菜单备注"
                }
            ],
            "groupCode": "TEST",
            "menuCode": "1001",
            "menuIcon": "layui-icon",
            "menuId": "1371375808132800514",
            "menuName": "一级菜单",
            "menuSort": 1,
            "menuUrl": "",
            "parentId": "",
            "remark": "一级菜单备注"
        },
        {
            "accountId": "1371370289309515777",
            "appId": "PC",
            "childrens": [],
            "groupCode": "TEST",
            "menuCode": "1002",
            "menuIcon": "layui-icon",
            "menuId": "ME1371639941642178562",
            "menuName": "一级-02菜单",
            "menuSort": 2,
            "menuUrl": "",
            "parentId": "",
            "remark": "一级-02菜单备注"
        }
    ],
    "respCode": "00000",
    "respMsg": "success"
}

创建菜单信息

URL:http://develop.persagy.com/saas-platform/saas-account/menu/createSaasMenu
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "parentId":"",    //上级菜单ID,选填
    "menuCode":"1001",     //菜单编码,必填
    "menuName":"一级菜单",         //菜单名称,必填
    "menuUrl":"/query/list",    //菜单URL,选填
    "urlType":"0",  //URL类型,0-相对路径,1-绝对路径,选填,当 menuUrl 不为空时,此处必填
    "menuIcon":"layui-icon",     //菜单图片,选填
    "menuSort":1,         //菜单顺序,必填
    "menuType":"0",     //菜单类型,0-系统菜单,1-标准业务菜单,2-IBMS菜单,3-APP菜单,必填
    "remark":"一级菜单备注"    //备注,选填
}

返回:

{
    "content": "ME1371761303924879361",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新菜单信息

URL:http://develop.persagy.com/saas-platform/saas-account/menu/updateSaasMenu
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"1371374894051352577",      //菜单ID,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "parentId":"",    //上级菜单ID,选填
    "menuCode":"1001",     //菜单编码,必填
    "menuName":"一级菜单",         //菜单名称,必填
    "menuUrl":"/query/list",    //菜单URL,选填
    "urlType":"0",  //URL类型,0-相对路径,1-绝对路径,选填,当 menuUrl 不为空时,此处必填
    "menuIcon":"layui-icon",     //菜单图片,选填
    "menuSort":1,         //菜单顺序,必填
    "menuType":"0",     //菜单类型,0-系统菜单,1-标准业务菜单,2-IBMS菜单,3-APP菜单,必填
    "remark":"一级菜单备注"    //备注,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

删除菜单信息

级联删除菜单下功能点,及角色-菜单功能关联关系

URL:http://develop.persagy.com/saas-platform/saas-account/menu/deleteSaasMenu
Method:POST
Header:Content-Type=application/json

请求:

{
    "id":"ME1372505865173700610",      //菜单ID,必填
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,必填
    "appId":"PC",        //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "groupCode":"TEST"      //集团编码
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

功能点管理

查询功能点信息

URL:http://develop.persagy.com/saas-platform/saas-account/function/querySaasFunctionList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "menuId":"1371376123917754369",       //菜单ID,选填
    "funCode":"011001",    //功能编码,选填
    "funName":"测试功能点"       //功能名称,支持模糊查询,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

角色菜单功能点列表查询

说明:接口返回数据会包括,此角色下所有被分配的功能点信息集合,以及未有功能点的菜单信息集合,均平铺返回

URL:http://develop.persagy.com/saas-platform/saas-account/function/querySaasRoleFunctions
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,做为sql条件
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,必填,不做为sql条件
    "groupCode":"sybs",       //集团编码,选填
    "roleId":"RO1377815673866051586"        //角色ID,必填
}

返回:

{
    "content": {
        "menus":[
            {
                "appId": "PC",
                "id": "ME1372505574210636732",
                "menuCode": "1001",
                "menuId": "ME1372505574210636732",
                "menuName": "通讯录",
                "menuSort": 1,
                "menuType": "1",
                "menuUrl": "/address-book",
                "remark": "通讯录",
                "urlType": "0"
            },
        ],
        "functions":[]
    },
    "respCode": "00000",
    "respMsg": "success"
}

创建功能点信息

URL:http://develop.persagy.com/saas-platform/saas-account/function/createSaasFunction
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "menuId":"1371376123917754369",       //菜单ID,必填
    "funCode":"1001010102",    //功能编码,必填
    "funName":"删除",       //功能名称,必填
    "funUrl":"/account/deleteSaasAccount",      //功能URL,必填
    "funSort":1,    //功能顺序,必填
    "remark":"功能点备注信息"   //备注
}

返回:

{
    "content": "FU1371761303924879361",
    "respCode": "00000",
    "respMsg": "保存成功"
}

更新功能点信息

URL:http://develop.persagy.com/saas-platform/saas-account/function/updateSaasFunction
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"FU1371635736550330370",        //功能ID,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填
    "menuId":"1371376123917754369",       //菜单ID,必填
    "funCode":"1001010102",    //功能编码,必填
    "funName":"删除",       //功能名称,必填
    "funUrl":"/account/deleteSaasAccount",      //功能URL,必填
    "funSort":2,    //功能顺序,必填
    "remark":"功能点备注信息"   //备注
}

返回:

{
    "respCode": "00000",
    "respMsg": "更新成功"
}

删除功能点信息

URL:http://develop.persagy.com/saas-platform/saas-account/function/deleteSaasFunction
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "id":"FU1371635736550330370",            //功能点ID,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填
    "appId":"PC"         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为SQL条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

账号-集团区域项目管理

账号-集团项目统计列表分页查询(根据账号做数据权限过滤)

URL:http://develop.persagy.com/saas-platform/saas-account/accountProject/querAccountProjectTotal
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"1",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "appId":"PC",               //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "accountId":"AC1377877457683660802",     //当前账号ID,必填,做为sql条件
    "groupCode":"sybs",        //集团编码,选填
    "page":1,       //分页页码,不可低于1,必填
    "size":10       //分页大小,不可低于1,必填
}

返回:

{
    "content": [
        {
            "accountBelong": "1",
            "accountSource": "persagy",
            "accountType": "2",
            "appId": "PC",
            "createTime": 1617292800000,
            "groupCode": "sybs",
            "groupName": "啥也不是",
            "groups": [
                {
                    "createTime": 1617292800000,
                    "groupCode": "sybs",
                    "groupName": "啥也不是",
                    "syncState": "2",
                    "updateTime": 1617292800000,
                    "updateUser": "AC1372371635352403969",
                    "valid": 1
                }
            ],
            "id": "AC1377868242034458626",
            "mail": "111@qq.com",
            "phoneNum": "18610777465",
            "projectNum": 0,
            "updateTime": 1617292800000,
            "updateUser": "AC1377819021444931585",
            "username": "xiaoxiao10",
            "valid": 1,
            "validEndTime": 1640880000000,
            "validLast": "0",
            "validStartTime": 1617292800000
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

查询账号-集团区域项目关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountProject/querySaasAccountProjectList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "accountId":"AC1374999923417702402",     //当前账号ID,必填,做为sql条件
    "appId":"PC",               //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"QKZZ",         //集团编码,选填
    "areaId":"AR1381514340082958337",   //区域ID,选填
    "projectId":"PR1371761303924879361"      //项目ID,选填
}

返回:

{
    "content": [
        {
            "accountId": "AC1374999923417702402",
            "projectId":"PR1371761303924879361",
            "groupCode": "QKZZ"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

添加账号-集团区域项目关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountProject/createSaasAccountProject
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "accountId":"AC1374999923417702402",     //当前账号ID,必填,做为sql条件
    "appId":"PC",               //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"QKZZ",         //集团编码,必填
    "areaId":"AR1381514340082958337",   //区域ID,必填
    "projectId":"PR1371761303924879361"      //项目ID,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "保存成功"
}

重置账号-集团区域项目关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountProject/resetSaasAccountProject
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "accountId":"AC1372371635352403969",     //当前账号ID,必填,做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "auths": [
        {
            "groupCode":"TEST",             //集团编码,必填
            "areaId":"AR1381514340082958337",   //区域ID,必填
            "projectId":"AR1381514340082958337" //项目ID,选填
        }
    ]
}

返回:

{
    "respCode": "00000",
    "respMsg": "重置成功"
}

删除账号-集团项目关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountProject/deleteSaasAccountProject
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,不做为sql条件
    "accountId":"AC1374999923417702402",     //当前账号ID,必填,做为sql条件
    "appId":"PC",               //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"QKZZ",         //集团编码,选填
    "areaId":"AR1381514340082958337",   //区域ID,选填
    "projectId":"PR1371761303924879361"      //项目ID,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

账号-角色权限管理

查询账号-角色关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountRole/querySaasRoleMenuList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,选填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,选填
    "roleId":"RO1372505156457959425",      //角色ID,选填
    "accountIds":[      //账号ID集合,选填,返回结果是一条条的记录,而非按照账号ID聚合
        "AC1372371635352403969"
    ]
}

返回:

{
    "content": [
        {
            "accountId": "AC1372371635352403969",
            "groupCode": "TEST",
            "roleId": "RO1372505156457959425"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

新增账号-角色关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountRole/createSaasAccountRole
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleId":"RO1372505156457959425"      //角色ID,必填
}

返回:

{
    "respCode": "00000",
    "respMsg": "保存成功"
}

重置账号-角色关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountRole/resetSaasAccountRole
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填,做为sql条件
    "accountId":"AC1375000220760301569",     //当前账号ID,必填,做为sql条件
    "appId":"PC",               //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"03",         //集团编码,accountBelong为业务账号时,必填
    "casType":"0"          //关联类型,0-主岗,1-副岗,2-业务超管默认角色,选填,这里的关联类型,会作为重置的条件,进行删除数据的依据
    "roles": [          //角色集合,必填
        {
            "roleId":"RO0134568781001",   //角色ID,必填
            "casType":"0"                //关联类型,0-主岗,1-副岗,2-业务超管默认角色,选填,这里关联类型会直接插入数据库中,不做为重置的条件
        }
    ]
}

返回:

{
    "respCode": "00000",
    "respMsg": "重置成功"
}

删除账号-角色关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/accountRole/deleteSaasAccountRole
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"AC1372371635352403969",     //当前账号ID,必填
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,选填
    "roleId":"RO1372505156457959425"      //角色ID,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

角色-菜单功能权限管理

查询角色-菜单功能关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/roleMenu/querySaasRoleMenuList
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleId":"RO1371761303924879361",       //角色ID,选填
    "menuId":"1371376123917754369",       //菜单ID,选填
    "functionId":"FU1371634297690148866"       //功能ID,选填
}

返回:

{
    "content": [
        {
            "functionId": "FU1371634297690148866",
            "groupCode": "TEST",
            "menuId": "1371376123917754369",
            "roleId": "RO1371761303924879361"
        }
    ],
    "count": 1,
    "respCode": "00000",
    "respMsg": "success"
}

新增角色-菜单关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/roleMenu/createSaasRoleMenu
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleId":"RO1371761303924879361",       //角色ID,必填
    "menuId":"ME1371639941642178563",       //菜单ID,必填
    "functionId":"FU1371635736550330370"       //功能ID,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "保存成功"
}

重置角色-菜单关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/roleMenu/resetSaasRoleMenu
Method:POST
Header:Content-Type=application/json

请求:

// 先删后新增,仅删除此角色下的所有菜单功能点的关联关系,并重新新增
{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleId":"RO1371761303924879362",       //角色ID,必填
    "auths": [              //菜单功能集合,必填
        {
            "menuId":"1371376123917754369",       //菜单ID,必填
            "functionId":"1371376123917754369"       //功能ID,选填
        },
        {
            "menuId":"1371376123917754369",       //菜单ID,必填
            "functionId":"1371376123917754380"       //功能ID,选填
        }
    ]
}

返回:

{
    "respCode": "00000",
    "respMsg": "重置成功"
}

删除角色-菜单关联信息

URL:http://develop.persagy.com/saas-platform/saas-account/roleMenu/deleteSaasRoleMenu
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountBelong":"0",        //账号所属, 0-运维系统账号,1-业务账号,必填
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
    "appId":"PC",         //应用ID, PC-电脑端,APP-手机应用端,BIM-BIM平台,,必填,不做为sql条件
    "groupCode":"TEST",    //集团编码,必填
    "roleId":"RO1371761303924879362",       //角色ID,选填
    "menuId":"1371376123917754369",       //菜单ID,选填
    "functionId":"1371376123917754369"       //功能ID,选填
}

返回:

{
    "respCode": "00000",
    "respMsg": "删除成功"
}

迭代-升级接口管理

说明:此下面所有的接口,均在每次提测后第一次部署成功后,执行,除此之外,均不需要执行

新增区域权限表,兼容老数据接口

说明:此接口,必须返回成功,成功样例如下响应所示,否则请再次执行

URL:http://develop.persagy.com/saas-platform/saas-account/upgrade/updateAccountAreaAuth
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "success"
}

清除redis中的账号token值,兼容老数据接口

说明:此接口,必须返回成功,成功样例如下响应所示,否则请再次执行

URL:http://develop.persagy.com/saas-platform/saas-account/upgrade/clearRedisCache
Method:POST
Header:Content-Type=application/json

请求:

{
    "accountId":"1371370289309515777",     //当前账号ID,必填,不做为sql条件
}

返回:

{
    "respCode": "00000",
    "respMsg": "success"
}

三方账号对接管理

申请授权码

URL:http://develop.persagy.com/saas-platform/saas-account/authCenter/code
Method:POST
Header:Content-Type=application/json

请求:

{
    "clientId":"RGF4RHUYTJMNRWH4N"  // 授权三方机构标识ID,由运维平台在对接时颁发,必填
}

返回:

{
    "content": {
        "code":"123",       //一次性的code值,后续获取token时使用
    },
    "respCode": "00000",
    "respMsg": "success"
}

根据授权码获取token

URL:http://develop.persagy.com/saas-platform/saas-account/authCenter/codeToken
Method:POST
Header:Content-Type=application/json

请求:

{
    "code":"123",                       //一次性的授权码,必填
    "clientId":"RGF4RHUYTJMNRWH4N"  // 授权三方机构标识ID,由运维平台在对接时颁发,必填
}

返回:

{
    "content": {
        "token":"31430ad51fd0c5b1c66dd8ba382cc33392974cc138dea908.F4B702C0FE3AE2F8DCE6443B434BD26E",    //格式:授权信息.token
        "expire": "60"          //token有效期,单位:分钟
    },
    "respCode": "00000",
    "respMsg": "success"
}

账号注册-RabbitMQ消息