Showing
2 changed files
with
186 additions
and
0 deletions
商家端/商家端PC端OA接口.md
0 → 100644
1 | +## ----接口说明---- ## | ||
2 | + | ||
3 | +以下相关接口为北京侧Java服务 | ||
4 | + | ||
5 | +文档原始地址: http://git.yoho.cn/YOHOERP/erp-gateway/wikis/oa系统 | ||
6 | + | ||
7 | +测试环境联调地址示例: http://192.168.13.180/erp-gateway-web/account/profile/login | ||
8 | + | ||
9 | +线上环境地址示例: 待定 | ||
10 | + | ||
11 | +### 1、登录 | ||
12 | +> add by Tina, 2016/7/19 | ||
13 | + | ||
14 | +#### /erp-ams-web/account/profile/login | ||
15 | +| 名称 | 类型|是否必须|示例值|默认值|描述| | ||
16 | +| -------- | -------- | -------- | -------- | -------- | -------- | | ||
17 | +| account| String| Y | "mhh" | 无 | 账户名称 | | ||
18 | +| password| String| Y | "0.123456" | 无 | 密码 | | ||
19 | +| platform| Integer| Y | 2 | 无 | 平台标识:1平台端 2商家端 | | ||
20 | + | ||
21 | +### 微服务调用 Service Node | ||
22 | +```java | ||
23 | +ams:account_profile.login | ||
24 | +``` | ||
25 | +### 业务处理 | ||
26 | +1. 账号获取用户信息 | ||
27 | +2. 验证 | ||
28 | + - 账号是否存在(201) | ||
29 | + - 账号是否过期(201) | ||
30 | + - 账号是否关闭(201) | ||
31 | + - 是否有权限登录当前站点(201) | ||
32 | + - 验证密码(407) | ||
33 | +3. 更新当前账号登录时间 | ||
34 | +4. 获取供应商id,无则置为0;置空密码信息;设置create_time的可读格式(yyyy-mm-dd HH:ii:ss)为create_date | ||
35 | +5. 返回结果 | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | +### Request | ||
40 | +```java | ||
41 | +{ | ||
42 | + "account" : "fengjb", | ||
43 | + "password" : "0.123456", | ||
44 | + "platform" : 1 | ||
45 | +} | ||
46 | +``` | ||
47 | + | ||
48 | +### Result | ||
49 | +```java | ||
50 | +{ | ||
51 | + "account": "ad", | ||
52 | + "auth_site": "1,2", //1-运营平台 2-商家平台 | ||
53 | + "create_date": "2016-03-29 14:44:01", | ||
54 | + "create_id": 2793, | ||
55 | + "create_time": 1459233841, | ||
56 | + "dept_id": 1, | ||
57 | + "email": "123", | ||
58 | + "expires": 1484841600, | ||
59 | + "login_time": 1468568505, | ||
60 | + "logout_time": 0, | ||
61 | + "phone": "15101660386", | ||
62 | + "pid": 100083, | ||
63 | + "role_id": 1, | ||
64 | + "staff_code": "000", | ||
65 | + "status": 1, //0关闭 1开启 | ||
66 | + "supplier_id": 0, | ||
67 | + "truename": "超级管理员" | ||
68 | +} | ||
69 | +``` | ||
70 | + | ||
71 | +### 2、获取账户有权限访问的菜单列表 | ||
72 | +> add by mhh, 2016/7/19 | ||
73 | + | ||
74 | +### /erp-ams-web/account/menu/query_by_pid | ||
75 | +| 名称 | 类型|是否必须|示例值|默认值|描述| | ||
76 | +| -------- | -------- | -------- | -------- | -------- | -------- | | ||
77 | +| pid| Integer| Y |100083 | 无 | 用户id | | ||
78 | +| platform_id| Integer| Y | 1 | 无 | 平台标识:1平台端 2商家端 | | ||
79 | + | ||
80 | +### 微服务调用 Service Node | ||
81 | +```java | ||
82 | +ams:account_menu.getMenuByPid | ||
83 | +``` | ||
84 | + | ||
85 | +### Request | ||
86 | +```java | ||
87 | +{ | ||
88 | + "pid" : 10, | ||
89 | + "platform_id" : 1 | ||
90 | +} | ||
91 | +``` | ||
92 | + | ||
93 | +### Result | ||
94 | +```java | ||
95 | +[ | ||
96 | + { | ||
97 | + "id": "1", | ||
98 | + "menu_name": "基本设置", | ||
99 | + "menu_img": "", | ||
100 | + "description": "基本设置", | ||
101 | + "menu_url": "", | ||
102 | + "parent_id": "0", | ||
103 | + "platform": "1", | ||
104 | + "order_by": "1110", | ||
105 | + "create_time": "1455614805", | ||
106 | + "status": "1", | ||
107 | + "sub": [ | ||
108 | + { | ||
109 | + "id": "3", | ||
110 | + "menu_name": "权限管理", | ||
111 | + "menu_img": "", | ||
112 | + "description": "权限管理", | ||
113 | + "menu_url": "/account/action/index", | ||
114 | + "parent_id": "1", | ||
115 | + "platform": "1", | ||
116 | + "order_by": "99", | ||
117 | + "create_time": "1455614928", | ||
118 | + "status": "1", | ||
119 | + "sub": [] | ||
120 | + }, | ||
121 | + { | ||
122 | + "id": "2", | ||
123 | + "menu_name": "菜单管理", | ||
124 | + "menu_img": "", | ||
125 | + "description": "菜单管理", | ||
126 | + "menu_url": "/account/menu/index", | ||
127 | + "parent_id": "1", | ||
128 | + "platform": "1", | ||
129 | + "order_by": "98", | ||
130 | + "create_time": "1455614851", | ||
131 | + "status": "1", | ||
132 | + "sub": [] | ||
133 | + }, | ||
134 | + { | ||
135 | + "id": "282", | ||
136 | + "menu_name": "数据权限管理", | ||
137 | + "menu_img": "", | ||
138 | + "description": "数据权限管理", | ||
139 | + "menu_url": "/account/datarole/index", | ||
140 | + "parent_id": "1", | ||
141 | + "platform": "1", | ||
142 | + "order_by": "0", | ||
143 | + "create_time": "1467268023", | ||
144 | + "status": "1", | ||
145 | + "sub": [] | ||
146 | + } | ||
147 | + ] | ||
148 | + } | ||
149 | +] | ||
150 | +``` | ||
151 | + | ||
152 | +### 3、验证权限 | ||
153 | +> add by mhh, 2016/7/19 | ||
154 | + | ||
155 | +#### /erp-ams-web/account/action/verify_auth | ||
156 | + | ||
157 | +| 名称 | 类型|是否必须|示例值|默认值|描述| | ||
158 | +| -------- | -------- | -------- | -------- | -------- | -------- | | ||
159 | +| pid| Integer | Y | 10 | 无 | 账户id| | ||
160 | +| role_id| Integer | Y | 10 | 无 | 角色id| | ||
161 | +| path| String| Y | "/default/index/index" | 无 | 路径 | | ||
162 | +| platform_id| Integer | Y | 1 | 无 | 平台标识:1平台端 2商家端 | | ||
163 | + | ||
164 | +### 微服务调用 Service Node | ||
165 | +```java | ||
166 | +ams:account_action.verifyAuth | ||
167 | +``` | ||
168 | + | ||
169 | +### Request | ||
170 | +```java | ||
171 | +{ | ||
172 | + "pid" : 10, | ||
173 | + "role_id" : 19, | ||
174 | + "path" : "/default/index/index", | ||
175 | + "platform_id" : 1 | ||
176 | +} | ||
177 | +``` | ||
178 | + | ||
179 | +### Result | ||
180 | +```java | ||
181 | +{ | ||
182 | + "code":200 | ||
183 | + "errmsg":"验证成功!" | ||
184 | +} | ||
185 | +``` | ||
186 | + |
-
Please register or login to post a comment