|
@@ -87,17 +87,17 @@ public class RoleOptionLimit extends Controller {
|
|
|
RowsMap optiontypemxMap = new RowsMap();
|
|
|
|
|
|
if (rows.isNotEmpty()) {
|
|
|
- String sql = "SELECT distinct optiontypeid,value,subvalues from sys_optiontypemx WHERE optiontypeid in " + rows.toArrayList("optiontypeid");
|
|
|
+ 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) {
|
|
|
Rows optiontypemxRows = optiontypemxMap.getOrDefault(row.getString("optiontypeid"), new Rows());
|
|
|
- for (Row optiontypemxRow : optiontypemxRows) {
|
|
|
- optiontypemxRow.putIfAbsent("subvalues", new JSONArray());
|
|
|
- }
|
|
|
+// for (Row optiontypemxRow : optiontypemxRows) {
|
|
|
+// optiontypemxRow.putIfAbsent("subvalues", new JSONArray());
|
|
|
+// }
|
|
|
|
|
|
- row.put("optiontypemxall", optiontypemxRows);
|
|
|
+// row.put("optiontypemxall", optiontypemxRows);
|
|
|
row.put("optiontypemx", optiontypemxRows.toArray("value"));
|
|
|
Long optiontypeid = row.getLong("optiontypeid");
|
|
|
Rows valuerows = dbConnect.runSqlQuery("SELECT `value` from sys_role_optionlimit WHERE roleid=" + roleid + " and optiontypeid=" + optiontypeid);
|
|
@@ -122,15 +122,15 @@ public class RoleOptionLimit extends Controller {
|
|
|
return getSucReturnObject().setData(new Row()).toString();
|
|
|
}
|
|
|
|
|
|
- String sql = "SELECT distinct optiontypeid,value,subvalues from sys_optiontypemx WHERE optiontypeid in " + rows.toArrayList("optiontypeid");
|
|
|
+ String sql = "SELECT distinct optiontypeid,value from sys_optiontypemx WHERE optiontypeid in " + rows.toArrayList("optiontypeid");
|
|
|
RowsMap optiontypemxMap = dbConnect.runSqlQuery(sql.replace("[", "(").replace("]", ")")).toRowsMap("optiontypeid");
|
|
|
|
|
|
for (Row row : rows) {
|
|
|
Rows optiontypemxRows = optiontypemxMap.getOrDefault(row.getString("optiontypeid"), new Rows());
|
|
|
- for (Row optiontypemxRow : optiontypemxRows) {
|
|
|
- optiontypemxRow.putIfAbsent("subvalues", new JSONArray());
|
|
|
- }
|
|
|
- row.put("optiontypemxall", optiontypemxRows);
|
|
|
+// for (Row optiontypemxRow : optiontypemxRows) {
|
|
|
+// optiontypemxRow.putIfAbsent("subvalues", new JSONArray());
|
|
|
+// }
|
|
|
+// row.put("optiontypemxall", optiontypemxRows);
|
|
|
row.put("optiontypemx", optiontypemxRows.toArray("value"));
|
|
|
|
|
|
Rows valuerows = dbConnect.runSqlQuery("SELECT `value` from sys_role_optionlimit WHERE roleid=" + roleid + " and optiontypeid=" + optiontypeid);
|