|
@@ -156,9 +156,9 @@ public class EquipmentResourceLibrary extends Controller {
|
|
|
Rows attPicRows = new Rows();
|
|
|
Rows tempAttRows = attRowsMap.getOrDefault(row.getString("attachmentid"), new Rows());
|
|
|
for (Row tempAttRow : tempAttRows) {
|
|
|
- // if (tempAttRow.getString("usetype").equals(ownertable)) {
|
|
|
- attPicRows.add(tempAttRow);
|
|
|
- // }
|
|
|
+ // if (tempAttRow.getString("usetype").equals(ownertable)) {
|
|
|
+ attPicRows.add(tempAttRow);
|
|
|
+ // }
|
|
|
}
|
|
|
row.put("attinfos", attPicRows);
|
|
|
}
|
|
@@ -225,9 +225,9 @@ public class EquipmentResourceLibrary extends Controller {
|
|
|
where.append(" and (1=2");
|
|
|
for (Object obj : sat_courseware_classids) {
|
|
|
JSONArray array = (JSONArray) obj;
|
|
|
- for (Object obj2 : array) {
|
|
|
+ if (array.size() > 0) {
|
|
|
where.append(" or (");
|
|
|
- where.append("JSON_CONTAINS(t1.sat_sharematerial_classids,'" + obj2 + "')");
|
|
|
+ where.append("JSON_CONTAINS(t1.sat_sharematerial_classids,'" + array.get(array.size() - 1) + "')");
|
|
|
where.append(")");
|
|
|
}
|
|
|
}
|