|
|
@@ -35,16 +35,26 @@ public class wechatapplet extends Controller {
|
|
|
*/
|
|
|
public String getCoursewareList() throws P2Exception {
|
|
|
|
|
|
- String ttypedetailid = content.getString("ttypedetailid");
|
|
|
-
|
|
|
+ String ttypedetailid = "";
|
|
|
+ if (content.containsKey("ttypedetailid")) {
|
|
|
+ ttypedetailid = content.getString("ttypedetailid");
|
|
|
+ }
|
|
|
String keywords = "";
|
|
|
if (content.containsKey("keywords")) {
|
|
|
keywords = content.getString("keywords");
|
|
|
}
|
|
|
+ SQLFactory sqlFactory = null;
|
|
|
+ if (ttypedetailid.equals("")) {
|
|
|
+ sqlFactory = new SQLFactory(this, "查询课件列表_全部", pageSize, pageNumber, " t1.createdate desc");
|
|
|
+ sqlFactory.addParameter("keywords", "%" + keywords + "%");
|
|
|
+ } else {
|
|
|
+ sqlFactory = new SQLFactory(this, "查询课件列表", pageSize, pageNumber, " t1.createdate desc");
|
|
|
+ sqlFactory.addParameter("ttypedetailid", ttypedetailid);
|
|
|
+ sqlFactory.addParameter("keywords", "%" + keywords + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ String sql = sqlFactory.getSQL();
|
|
|
|
|
|
- SQLFactory sqlFactory = new SQLFactory(this, "查询课件列表", pageSize, pageNumber, " t1.createdate desc");
|
|
|
- sqlFactory.addParameter("ttypedetailid", ttypedetailid);
|
|
|
- sqlFactory.addParameter("keywords", "%" + keywords + "%");
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
// RowsMap rowsMap = getAttachmentUrl("tarchives_sc", rows.toArrayList("tarchives_scid"), "video");
|
|
|
//查询封面
|