|
@@ -233,10 +233,10 @@ public class UserService {
|
233
|
233
|
|
234
|
234
|
moduleCache.add(module);
|
235
|
235
|
|
236
|
|
- String strSQL = "select z.*\n" +
|
237
|
|
- "from k_module_priv t,k_module_priv_detail z\n" +
|
|
236
|
+ String strSQL = "select z.type,z.name,z.code,a.id m_id \n" +
|
|
237
|
+ "from k_module_priv t,k_module_priv_detail z,k_module a\n" +
|
238
|
238
|
"where t.m_code='{0}' and t.code = z.code\n" +
|
239
|
|
- " and t.code = t.m_code";
|
|
239
|
+ " and t.code = t.m_code and a.code = t.m_code";
|
240
|
240
|
List<Map> list = queryService.select(strSQL,module);
|
241
|
241
|
load(list);
|
242
|
242
|
}
|
|
@@ -254,6 +254,8 @@ public class UserService {
|
254
|
254
|
}
|
255
|
255
|
else if(type.equals("7")) { // api group
|
256
|
256
|
loadApiGroup(name);
|
|
257
|
+ }else{ //其他角色,直接加入
|
|
258
|
+ privs.add(map);
|
257
|
259
|
}
|
258
|
260
|
}
|
259
|
261
|
}
|
|
@@ -278,7 +280,7 @@ public class UserService {
|
278
|
280
|
|
279
|
281
|
//加载API
|
280
|
282
|
private void loadApi(String apiId) {
|
281
|
|
- String strSQL = "select code,method from k_api where id={0}";
|
|
283
|
+ String strSQL = "select 6 type,method name,code,0 m_id from k_api where id={0}";
|
282
|
284
|
List<Map> list = queryService.select(strSQL,apiId);
|
283
|
285
|
|
284
|
286
|
privs = ListUtil.merge(privs,list);
|