|
@@ -2,6 +2,10 @@ package com.cnd3b.restcontroller.enterprise.tarchives_sc;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.cnd3b.common.Controller;
|
|
import com.cnd3b.common.Controller;
|
|
|
|
|
+import com.cnd3b.common.data.Row;
|
|
|
|
|
+import com.cnd3b.common.data.Rows;
|
|
|
|
|
+import com.cnd3b.common.data.RowsMap;
|
|
|
|
|
+import com.cnd3b.common.data.SQLFactory;
|
|
|
import p2.common.parse.J;
|
|
import p2.common.parse.J;
|
|
|
import p2.pao.PaoRemote;
|
|
import p2.pao.PaoRemote;
|
|
|
import p2.pao.PaoSetRemote;
|
|
import p2.pao.PaoSetRemote;
|
|
@@ -126,6 +130,32 @@ public class tarchives_sc extends Controller {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public String selectTarchives_scList() {
|
|
public String selectTarchives_scList() {
|
|
|
- return getSucReturnObject().toString();
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ String keywords = "";
|
|
|
|
|
+ if (content.containsKey("keywords")) {
|
|
|
|
|
+ keywords = content.getString("keywords");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ SQLFactory sqlFactory = new SQLFactory(this, "²éѯ¿Î¼þÁбí", pageSize, pageNumber, " t1.createdate desc");
|
|
|
|
|
+ sqlFactory.addParameter("keywords", "%" + keywords + "%");
|
|
|
|
|
+ Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
|
|
+ RowsMap rowsMap = getAttachmentUrl("tarchives_sc", rows.toArrayList("tarchives_scid"), "video");
|
|
|
|
|
+ //²éѯ·âÃæ
|
|
|
|
|
+ RowsMap rowsMapCover = getAttachmentUrl("tarchives_sc", rows.toArrayList("tarchives_scid"), "cover");
|
|
|
|
|
+ for (Row row : rows) {
|
|
|
|
|
+ row.put("attinfos", rowsMap.get(row.getString("tarchives_scid")));
|
|
|
|
|
+ Rows coverRows = rowsMapCover.get(row.getString("tarchives_scid"));
|
|
|
|
|
+ if (!coverRows.isEmpty()) {
|
|
|
|
|
+ row.put("cover", coverRows.get(0).getString("fobsurl"));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row.put("cover", "");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|