|
|
@@ -240,4 +240,53 @@ public class coursewaredetail extends Controller {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ @API(title = "转移课件", apiversion = R.ID20240321091902.v1.class)
|
|
|
+ public String changeCoursewareDetail() throws YosException {
|
|
|
+
|
|
|
+ Long sat_coursewaredetailid = content.getLongValue("sat_coursewaredetailid");
|
|
|
+ Long sat_coursewareid = content.getLongValue("sat_coursewareid");
|
|
|
+
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sat_coursewaredetail");
|
|
|
+ updateSQL.setSiteid(siteid);
|
|
|
+ updateSQL.setUniqueid(sat_coursewaredetailid);
|
|
|
+ updateSQL.setValue("sat_coursewareid", sat_coursewareid);
|
|
|
+ updateSQL.update();
|
|
|
+
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ //课件列表
|
|
|
+ @API(title = "转移课程列表", apiversion = R.ID20240321093102.v1.class)
|
|
|
+ public String changeCoursewarelist() throws YosException {
|
|
|
+ /*
|
|
|
+ 过滤条件设置
|
|
|
+ */
|
|
|
+ StringBuffer where = new StringBuffer(" 1=1 ");
|
|
|
+ if (content.containsKey("where")) {
|
|
|
+ JSONObject whereObject = content.getJSONObject("where");
|
|
|
+ if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
|
|
|
+ where.append(" and (");
|
|
|
+ where.append("t1.title like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pageSorting.equals("''")) {
|
|
|
+ pageSorting = "t1.sequence";
|
|
|
+ }
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sat_courseware"
|
|
|
+ ,"sat_coursewareid","title","status");
|
|
|
+ querySQL.setTableAlias("t1").setPage(pageSize, pageNumber).setOrderBy(pageSorting);
|
|
|
+ querySQL.setWhere("status", "发布");
|
|
|
+ querySQL.setWhere(where.toString());
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|