|
|
@@ -60,7 +60,7 @@ public class RoleOptionLimit extends Controller {
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
|
|
|
|
|
|
- return detail();
|
|
|
+ return detail();
|
|
|
}
|
|
|
|
|
|
@API(title = "角色选项权限-删除", apiversion = R.ID20231201145402.v1.class)
|
|
|
@@ -84,8 +84,12 @@ public class RoleOptionLimit extends Controller {
|
|
|
sqlFactory.addParameter("roleid", roleid);
|
|
|
Rows rows = sqlFactory.runSqlQuery(dbConnect);
|
|
|
|
|
|
- String sql = "SELECT distinct optiontypeid,value from sys_optiontypemx WHERE optiontypeid in " + rows.toArrayList("optiontypeid");
|
|
|
- RowsMap optiontypemxMap = dbConnect.runSqlQuery(sql.replace("[", "(").replace("]", ")")).toRowsMap("optiontypeid");
|
|
|
+ RowsMap optiontypemxMap = new RowsMap();
|
|
|
+
|
|
|
+ if (rows.isNotEmpty()) {
|
|
|
+ String sql = "SELECT distinct optiontypeid,value from sys_optiontypemx WHERE optiontypeid in " + rows.toArrayList("optiontypeid");
|
|
|
+ optiontypemxMap = dbConnect.runSqlQuery(sql.replace("[", "(").replace("]", ")")).toRowsMap("optiontypeid");
|
|
|
+ }
|
|
|
|
|
|
for (Row row : rows) {
|
|
|
row.put("optiontypemx", optiontypemxMap.getOrDefault(row.getString("optiontypeid"), new Rows()).toArray("value"));
|
|
|
@@ -108,7 +112,7 @@ public class RoleOptionLimit extends Controller {
|
|
|
sqlFactory.addParameter("optiontypeid", optiontypeid);
|
|
|
sqlFactory.addParameter("roleid", roleid);
|
|
|
Rows rows = sqlFactory.runSqlQuery(dbConnect);
|
|
|
- if(rows.isEmpty()){
|
|
|
+ if (rows.isEmpty()) {
|
|
|
return getSucReturnObject().setData(new Row()).toString();
|
|
|
}
|
|
|
|