role.java 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. package restcontroller.webmanage.role;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import common.Controller;
  5. import common.YosException;
  6. import common.annotation.API;
  7. import common.annotation.CACHEING;
  8. import common.annotation.CACHEING_CLEAN;
  9. import common.annotation.cm;
  10. import common.data.Row;
  11. import common.data.Rows;
  12. import common.data.RowsMap;
  13. import common.data.SQLFactory;
  14. import restcontroller.R;
  15. import java.util.ArrayList;
  16. import java.util.HashMap;
  17. @API(title = "管理端-权限管理")
  18. public class role extends Controller {
  19. public role(JSONObject content) throws YosException {
  20. super(content);
  21. }
  22. @API(title = "角色列表查询", apiversion = R.ID20221101131902.v1.class)
  23. @CACHEING
  24. public String query_roleList() throws YosException {
  25. /*
  26. 过滤条件设置
  27. */
  28. StringBuffer where = new StringBuffer(" 1=1 ");
  29. if (content.containsKey("where")) {
  30. JSONObject whereObject = content.getJSONObject("where");
  31. if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
  32. where.append(" and(");
  33. where.append("t1.rolename like'%").append(whereObject.getString("condition")).append("%' ");
  34. where.append("or t1.remarks like'%").append(whereObject.getString("condition")).append("%' ");
  35. where.append(")");
  36. }
  37. if (whereObject.containsKey("usertype") && !"".equals(whereObject.getString("usertype"))) {
  38. where.append(" and(");
  39. where.append("t1.usertype like'%").append(whereObject.getString("usertype")).append("%' ");
  40. where.append(")");
  41. }
  42. if (whereObject.containsKey("issystem") && !"".equals(whereObject.getString("issystem"))) {
  43. where.append(" and(");
  44. where.append("t1.issystem ='").append(whereObject.getString("issystem")).append("'");
  45. where.append(")");
  46. }
  47. }
  48. SQLFactory sqlFactory = new SQLFactory(this, "角色列表查询", pageSize, pageNumber, pageSorting);
  49. sqlFactory.addParameter("siteid", siteid);
  50. sqlFactory.addParameter_SQL("where", where);
  51. Rows rows = dbConnect.runSqlQuery(sqlFactory);
  52. HashMap<String, String> usertypemap = getOptionType("usertype");
  53. for (Row row : rows) {
  54. row.put("usertypename", usertypemap.get(row.getString("usertype")));
  55. }
  56. return getSucReturnObject().setData(rows).toString();
  57. }
  58. @API(title = "角色详情查询")
  59. @CACHEING
  60. public String query_roleMain() throws YosException {
  61. long roleid = content.getLong("roleid");
  62. SQLFactory rolesql = new SQLFactory(this, "角色详情查询");
  63. rolesql.addParameter("roleid", roleid);
  64. rolesql.addParameter("siteid", siteid);
  65. Rows roleRows = dbConnect.runSqlQuery(rolesql);
  66. for (Row roleRow : roleRows) {
  67. roleRow.put("usertypename", getOptionType("usertype").get(roleRow.getString("usertype")));
  68. SQLFactory appsql = new SQLFactory(this, "角色详情查询_授权应用");
  69. StringBuffer where = new StringBuffer(" 1=1 ");
  70. if (content.containsKey("where")) {
  71. JSONObject whereObject = content.getJSONObject("where");
  72. if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
  73. where.append(" and(");
  74. where.append("t4.systemappname like'%").append(whereObject.getString("condition")).append("%' ");
  75. where.append("or t3.systemmodulename like'%").append(whereObject.getString("condition")).append("%' ");
  76. where.append("or t1.systemname like'%").append(whereObject.getString("condition")).append("%' ");
  77. where.append(")");
  78. }
  79. }
  80. appsql.addParameter_SQL("where", where);
  81. appsql.addParameter("roleid", roleid);
  82. Rows appRows = dbConnect.runSqlQuery(appsql);
  83. SQLFactory optionsql = new SQLFactory(this, "角色详情查询_授权功能");
  84. optionsql.addParameter("roleid", roleid);
  85. RowsMap optionRowsMap = dbConnect.runSqlQuery(optionsql).toRowsMap("systemappid");
  86. SQLFactory fieldlimitsql = new SQLFactory(this, "角色详情查询_隐藏栏位限制");
  87. fieldlimitsql.addParameter("roleid", roleid);
  88. RowsMap fieldlimitRowsMap = dbConnect.runSqlQuery(fieldlimitsql).toRowsMap("systemappid");
  89. for (Row appRow : appRows) {
  90. appRow.put("options", optionRowsMap.get(appRow.getString("systemappid")));
  91. appRow.put("hiddenfields", fieldlimitRowsMap.get(appRow.getString("systemappid")));
  92. }
  93. roleRow.put("apps", appRows);
  94. }
  95. return getSucReturnObject().setData(roleRows.get(0)).toString();
  96. }
  97. @API(title = "角色新增修改")
  98. @CACHEING_CLEAN(cms = {@cm(clazz = role.class, method = {"query_roleList", "query_roleMain"})})
  99. public String insertormodify_role() throws YosException {
  100. long roleid = content.getLongValue("roleid");
  101. String rolename = content.getString("rolename", "sys_role");
  102. String remarks = content.getString("remarks", "sys_role");
  103. String usertype = content.getString("usertype", "sys_role");
  104. JSONArray fielddatatypelimit = new JSONArray();
  105. if (content.containsKey("fielddatatypelimit")) {
  106. fielddatatypelimit = content.getJSONArray("fielddatatypelimit");
  107. }
  108. SQLFactory sqlFactory = null;
  109. if (roleid <= 0 || dbConnect.runSqlQuery("select roleid from sys_role where roleid=" + roleid).isEmpty()) {
  110. roleid = createTableID("sys_role");
  111. sqlFactory = new SQLFactory(this, "角色新增");
  112. sqlFactory.addParameter("roleid", roleid);
  113. sqlFactory.addParameter("isshieldinfo", content.getLongValue("isshieldinfo"));
  114. sqlFactory.addParameter("siteid", siteid);
  115. sqlFactory.addParameter("rolename", rolename);
  116. sqlFactory.addParameter("remarks", remarks);
  117. sqlFactory.addParameter("usertype", usertype);
  118. sqlFactory.addParameter("fielddatatypelimit", fielddatatypelimit);
  119. sqlFactory.addParameter("createby", username);
  120. content.put("roleid", roleid);
  121. } else {
  122. if (dbConnect.runSqlQuery("select * from sys_role where issystem=1 and roleid=" + roleid).isNotEmpty()) {
  123. //return getErrReturnObject().setErrMsg("系统预设权限组不可修改").toString();
  124. }
  125. sqlFactory = new SQLFactory(this, "角色修改");
  126. sqlFactory.addParameter("roleid", roleid);
  127. sqlFactory.addParameter("rolename", rolename);
  128. sqlFactory.addParameter("isshieldinfo", content.getLongValue("isshieldinfo"));
  129. sqlFactory.addParameter("remarks", remarks);
  130. sqlFactory.addParameter("usertype", usertype);
  131. sqlFactory.addParameter("changeby", username);
  132. sqlFactory.addParameter("fielddatatypelimit", fielddatatypelimit);
  133. }
  134. dbConnect.runSqlUpdate(sqlFactory);
  135. return query_roleMain();
  136. }
  137. @API(title = "角色删除", apiversion = R.ID20221101132002.v1.class)
  138. @CACHEING_CLEAN(cms = {@cm(clazz = role.class, method = {"query_roleList", "query_roleMain"})})
  139. public String delete_role() throws YosException {
  140. JSONArray roleids = content.getJSONArray("roleids");
  141. String sql = "select * from sys_role where issystem=1 and roleid in " + roleids.toJavaList(Long.class);
  142. sql = sql.replace("[", "(").replace("]", ")");
  143. if (dbConnect.runSqlQuery(sql).isNotEmpty()) {
  144. return getErrReturnObject().setErrMsg("系统预设权限组不可删除").toString();
  145. }
  146. ArrayList<String> sqlilist = new ArrayList<>();
  147. for (Object id : roleids) {
  148. Long roleid = Long.parseLong(id.toString());
  149. sqlilist.add("delete from sys_role where roleid=" + roleid);
  150. sqlilist.add("delete from sys_roleappoptionauth where roleid=" + roleid);
  151. sqlilist.add("delete from sys_roleapphiddenfieldlimit where roleid=" + roleid);
  152. sqlilist.add("delete from sys_userrole where roleid=" + roleid);
  153. sqlilist.add("delete from sys_role_datalimit where roleid=" + roleid);
  154. sqlilist.add("delete from sys_rolereportauth where roleid=" + roleid);
  155. }
  156. dbConnect.runSqlUpdate(sqlilist);
  157. for (Object id : roleids) {
  158. Long roleid = Long.parseLong(id.toString());
  159. logroleout(roleid);
  160. }
  161. return getSucReturnObject().toString();
  162. }
  163. /**
  164. * 系统应用选择
  165. *
  166. * @return
  167. */
  168. @API(title = "角色授权系统应用选择")
  169. @CACHEING
  170. public String query_appselect() throws YosException {
  171. /*
  172. 过滤条件设置
  173. */
  174. StringBuffer where = new StringBuffer(" 1=1 ");
  175. if (content.containsKey("where")) {
  176. JSONObject whereObject = content.getJSONObject("where");
  177. if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
  178. where.append(" and(");
  179. where.append("t1.systemname like'%").append(whereObject.getString("condition")).append("%' ");
  180. where.append("or t2.systemclientname like'%").append(whereObject.getString("condition")).append("%' ");
  181. where.append("or t3.systemmodulename like'%").append(whereObject.getString("condition")).append("%' ");
  182. where.append("or t4.systemappname like'%").append(whereObject.getString("condition")).append("%' ");
  183. where.append(")");
  184. }
  185. if (whereObject.containsKey("systemname") && !"".equals(whereObject.getString("systemname"))) {
  186. where.append(" and(");
  187. where.append("t1.systemname like'%").append(whereObject.getString("systemname")).append("%' ");
  188. where.append(")");
  189. }
  190. if (whereObject.containsKey("systemclientname") && !"".equals(whereObject.getString("systemclientname"))) {
  191. where.append(" and(");
  192. where.append("t2.systemclientname like'%").append(whereObject.getString("systemclientname")).append("%' ");
  193. where.append(")");
  194. }
  195. if (whereObject.containsKey("systemmodulename") && !"".equals(whereObject.getString("systemmodulename"))) {
  196. where.append(" and(");
  197. where.append("t3.systemmodulename like'%").append(whereObject.getString("systemmodulename")).append("%' ");
  198. where.append(")");
  199. }
  200. if (whereObject.containsKey("systemappname") && !"".equals(whereObject.getString("systemappname"))) {
  201. where.append(" and(");
  202. where.append("t4.systemappname like'%").append(whereObject.getString("systemappname")).append("%' ");
  203. where.append(")");
  204. }
  205. }
  206. SQLFactory appselectsql = new SQLFactory(this, "应用授权选择", pageSize, pageNumber, pageSorting);
  207. appselectsql.addParameter_SQL("where", where);
  208. Rows approws = dbConnect.runSqlQuery(appselectsql);
  209. return getSucReturnObject().setData(approws).toString();
  210. }
  211. /**
  212. * 系统应用功能选择
  213. *
  214. * @return
  215. */
  216. @API(title = "角色授权系统功能选择")
  217. @CACHEING
  218. public String query_appoptionselect() throws YosException {
  219. long roleid = content.getLongValue("roleid");
  220. long systemappid = content.getLong("systemappid");
  221. SQLFactory optionselectsql = new SQLFactory(this, "应用功能授权选择");
  222. optionselectsql.addParameter_in("systemappid", systemappid);
  223. optionselectsql.addParameter("roleid", roleid);
  224. Rows optionRows = dbConnect.runSqlQuery(optionselectsql.getSQL());
  225. return getSucReturnObject().setData(optionRows).toString();
  226. }
  227. /**
  228. * 系统应用隐藏栏位选择
  229. *
  230. * @return
  231. */
  232. @API(title = "角色授权系统隐藏栏位选择")
  233. @CACHEING
  234. public String query_apphiddenfieldselect() throws YosException {
  235. long roleid = content.getLongValue("roleid");
  236. long systemappid = content.getLong("systemappid");
  237. SQLFactory hiddenfieldselectsql = new SQLFactory(this, "应用隐藏栏位选择");
  238. hiddenfieldselectsql.addParameter_in("systemappid", systemappid);
  239. hiddenfieldselectsql.addParameter("roleid", roleid);
  240. Rows hiddenfieldsRows = dbConnect.runSqlQuery(hiddenfieldselectsql.getSQL());
  241. return getSucReturnObject().setData(hiddenfieldsRows).toString();
  242. }
  243. /**
  244. * 角色应用功能授权
  245. *
  246. * @return
  247. */
  248. @API(title = "角色应用功能授权")
  249. @CACHEING_CLEAN(cms = {@cm(clazz = role.class, method = {"query_roleMain", "query_appoptionselect"})})
  250. public String add_appauth() throws YosException {
  251. JSONArray apparrays = content.getJSONArray("systemapps");
  252. long roleid = content.getLong("roleid");
  253. ArrayList<String> sqllist = new ArrayList<>();
  254. for (Object o : apparrays) {
  255. JSONObject appObject = (JSONObject) o;
  256. long systemappid = appObject.getLong("systemappid");
  257. JSONArray optionids = appObject.getJSONArray("optionids");
  258. for (Object optionid : optionids) {
  259. SQLFactory sqlFactory = new SQLFactory(this, "角色功能授权");
  260. sqlFactory.addParameter("roleid", roleid);
  261. sqlFactory.addParameter("optionauthid", createTableID("sys_roleappoptionauth"));
  262. sqlFactory.addParameter("systemappid", systemappid);
  263. sqlFactory.addParameter("optionid", optionid.toString());
  264. sqllist.add(sqlFactory.getSQL());
  265. }
  266. JSONArray hiddenfields = appObject.getJSONArray("hiddenfields");
  267. for (Object hiddenfieldid : hiddenfields) {
  268. SQLFactory sqlFactory = new SQLFactory(this, "角色隐藏栏位授权");
  269. sqlFactory.addParameter("roleid", roleid);
  270. sqlFactory.addParameter("hiddenfieldlimitid", createTableID("sys_roleapphiddenfieldlimit"));
  271. sqlFactory.addParameter("systemappid", systemappid);
  272. sqlFactory.addParameter("hiddenfieldid", hiddenfieldid.toString());
  273. sqllist.add(sqlFactory.getSQL());
  274. }
  275. }
  276. dbConnect.runSqlUpdate(sqllist);
  277. logroleout(roleid);
  278. return getSucReturnObject().toString();
  279. }
  280. /**
  281. * 角色应用功能授权取消
  282. *
  283. * @return
  284. */
  285. @API(title = "角色应用功能取消授权")
  286. @CACHEING_CLEAN(cms = {@cm(clazz = role.class, method = {"query_roleMain"})})
  287. public String delete_appauth() throws YosException {
  288. JSONArray apparrays = content.getJSONArray("systemapps");
  289. long roleid = content.getLong("roleid");
  290. ArrayList<String> sqllist = new ArrayList<>();
  291. for (Object o : apparrays) {
  292. JSONObject appObject = (JSONObject) o;
  293. long systemappid = appObject.getLong("systemappid");
  294. JSONArray optionids = appObject.getJSONArray("optionids");
  295. for (Object optionid : optionids) {
  296. sqllist.add("delete from sys_roleappoptionauth where roleid=" + roleid + " and systemappid=" + systemappid + " and optionid=" + optionid);
  297. }
  298. JSONArray hiddenfields = appObject.getJSONArray("hiddenfields");
  299. for (Object hiddenfieldid : hiddenfields) {
  300. sqllist.add("delete from sys_roleapphiddenfieldlimit where roleid=" + roleid + " and systemappid=" + systemappid + " and hiddenfieldid=" + hiddenfieldid);
  301. }
  302. }
  303. dbConnect.runSqlUpdate(sqllist);
  304. logroleout(roleid);
  305. return getSucReturnObject().toString();
  306. }
  307. @API(title = "查询角色是否已使用", apiversion = R.ID20221121112102.v1.class)
  308. public String isRoleUsed() throws YosException {
  309. JSONArray roleids = content.getJSONArray("roleids");
  310. String sql = "SELECT * from sys_userrole WHERE roleid in " + roleids + " and siteid = '" + siteid + "'";
  311. sql = sql.replace("[", "(").replace("]", ")");
  312. Rows rows = dbConnect.runSqlQuery(sql);
  313. if (rows.isEmpty()) {
  314. //角色没有在使用
  315. return getSucReturnObject().setData(1).toString();
  316. } else {
  317. //角色在使用
  318. return getSucReturnObject().setData(2).toString();
  319. }
  320. }
  321. @API(title = "角色授权,报表选择查询", apiversion = R.ID20221213141501.v1.class)
  322. public String roleAuthReportSelect() throws YosException {
  323. /*
  324. 过滤条件设置
  325. */
  326. StringBuffer where = new StringBuffer(" 1=1 ");
  327. if (content.containsKey("where")) {
  328. JSONObject whereObject = content.getJSONObject("where");
  329. if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
  330. where.append(" and(");
  331. where.append("t2.name like'%").append(whereObject.getString("condition")).append("%' ");
  332. where.append(")");
  333. }
  334. }
  335. long roleid = content.getLong("roleid");
  336. SQLFactory sqlFactory = new SQLFactory(this, "角色授权报表选择查询");
  337. sqlFactory.addParameter("siteid", siteid);
  338. sqlFactory.addParameter("roleid", roleid);
  339. sqlFactory.addParameter_SQL("where", where);
  340. Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
  341. return getSucReturnObject().setData(rows).toString();
  342. }
  343. @API(title = "角色报表查询", apiversion = R.ID20221213141601.v1.class)
  344. public String roleAuthReportQuery() throws YosException {
  345. long roleid = content.getLong("roleid");
  346. SQLFactory sqlFactory = new SQLFactory(this, "角色授权报表查询");
  347. sqlFactory.addParameter("siteid", siteid);
  348. sqlFactory.addParameter("roleid", roleid);
  349. Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
  350. return getSucReturnObject().setData(rows).toString();
  351. }
  352. @API(title = "角色报表删除", apiversion = R.ID20221213141701.v1.class)
  353. public String roleAuthReportDelete() throws YosException {
  354. long roleid = content.getLong("roleid");
  355. JSONArray sys_reportids = content.getJSONArray("sys_reportids");
  356. ArrayList<String> sqlist = new ArrayList<>();
  357. for (Object o : sys_reportids) {
  358. sqlist.add("delete from sys_rolereportauth where roleid=" + roleid + " and sys_reportid=" + o);
  359. }
  360. dbConnect.runSqlUpdate(sqlist);
  361. return getSucReturnObject().toString();
  362. }
  363. @API(title = "角色报表添加", apiversion = R.ID20221213141801.v1.class)
  364. public String roleAuthReportadd() throws YosException {
  365. long roleid = content.getLong("roleid");
  366. JSONArray sys_reportids = content.getJSONArray("sys_reportids");
  367. ArrayList<String> sqlist = new ArrayList<>();
  368. for (Object o : sys_reportids) {
  369. SQLFactory sqlFactory = new SQLFactory(this, "角色授权报表新增");
  370. sqlFactory.addParameter("sys_rolereportauthid", createTableID("sys_rolereportauth"));
  371. sqlFactory.addParameter("roleid", roleid);
  372. sqlFactory.addParameter("sys_reportid", String.valueOf(o));
  373. sqlist.add(sqlFactory.getSQL());
  374. }
  375. dbConnect.runSqlUpdate(sqlist);
  376. return getSucReturnObject().toString();
  377. }
  378. @API(title = "角色数据限制查询", apiversion = R.ID20230216181301.v1.class)
  379. public String roleAuthDataLimitQuery() throws YosException {
  380. long roleid = content.getLong("roleid");
  381. SQLFactory sqlFactory = new SQLFactory(this, "角色数据限制查询");
  382. sqlFactory.addParameter("siteid", siteid);
  383. sqlFactory.addParameter("roleid", roleid);
  384. Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
  385. return getSucReturnObject().setData(rows).toString();
  386. }
  387. @API(title = "角色数据限制删除", apiversion = R.ID20230216181401.v1.class)
  388. public String roleAuthDataLimitDelete() throws YosException {
  389. long roleid = content.getLong("roleid");
  390. JSONArray sys_role_datalimitids = content.getJSONArray("sys_role_datalimitids");
  391. ArrayList<String> sqlist = new ArrayList<>();
  392. for (Object o : sys_role_datalimitids) {
  393. sqlist.add("delete from sys_role_datalimit where roleid=" + roleid + " and sys_role_datalimitid=" + o);
  394. logroleout(roleid);
  395. }
  396. dbConnect.runSqlUpdate(sqlist);
  397. return getSucReturnObject().toString();
  398. }
  399. @API(title = "角色数据限制添加修改", apiversion = R.ID20230216181501.v1.class)
  400. public String roleAuthDataLimitadd() throws YosException {
  401. long roleid = content.getLong("roleid");
  402. long sys_role_datalimitid = content.getLong("sys_role_datalimitid");
  403. String table_name = content.getString("table_name");
  404. String sqlstr = content.getString("sqlstr", true);
  405. if (dbConnect.runSqlQuery("select *from sys_role_datalimit where roleid='" + roleid + "' and table_name='" + table_name + "' and sys_role_datalimitid!=" + sys_role_datalimitid).isNotEmpty()) {
  406. return getErrReturnObject().setErrMsg("当前角色已存在" + table_name + "表的限制").toString();
  407. }
  408. if (sys_role_datalimitid <= 0 || dbConnect.runSqlQuery("select * from sys_role_datalimit where sys_role_datalimitid=" + sys_role_datalimitid).isEmpty()) {
  409. SQLFactory sqlFactory = new SQLFactory(this, "角色数据限制新增");
  410. sqlFactory.addParameter("sys_role_datalimitid", createTableID("sys_role_datalimit"));
  411. sqlFactory.addParameter("roleid", roleid);
  412. sqlFactory.addParameter("table_name", table_name);
  413. sqlFactory.addParameter("sqlstr", sqlstr);
  414. sqlFactory.addParameter("username", username);
  415. sqlFactory.addParameter("userid", userid);
  416. dbConnect.runSqlUpdate(sqlFactory.getSQL(false));
  417. } else {
  418. dbConnect.runSqlUpdate("update sys_role_datalimit set table_name='" + table_name + "',sqlstr='" + sqlstr + "',changeby='" + username + "',changedate=now(),changeuserid=" + userid + " where roleid=" + roleid + " and sys_role_datalimitid=" + sys_role_datalimitid);
  419. }
  420. logroleout(roleid);
  421. return getSucReturnObject().toString();
  422. }
  423. @API(title = "角色授权用户查询", apiversion = R.ID20230302135404.v1.class)
  424. public String queryRoles_Users() throws YosException {
  425. Long roleid = content.getLong("roleid");
  426. SQLFactory sqlFactory = new SQLFactory(this, "角色授权用户查询", pageSize, pageNumber, pageSorting);
  427. sqlFactory.addParameter("siteid", siteid);
  428. sqlFactory.addParameter("roleid", roleid);
  429. Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
  430. return getSucReturnObject().setData(rows).toString();
  431. }
  432. }