|
|
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.cnd3b.common.Controller;
|
|
|
import com.cnd3b.common.D3bException;
|
|
|
+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 com.cnd3b.common.data.db.DataPool;
|
|
|
import p2.pao.PaoRemote;
|
|
|
@@ -53,6 +55,18 @@ public class noticemag extends Controller {
|
|
|
noticehead.addParameter_SQL("where", where);
|
|
|
Rows rows = dbConnect.runSqlQuery(noticehead.getSQL());
|
|
|
|
|
|
+ ArrayList<String> tnoticeidlist = rows.toArrayList("tnoticeid");
|
|
|
+ //公告附件数量查询
|
|
|
+ RowsMap attinfocountmap = getAttachmentQty("tnotice", tnoticeidlist);
|
|
|
+ //公告封面图查询
|
|
|
+ RowsMap noticecovermap = getAttachmentUrl("tnotice", tnoticeidlist, "cover");
|
|
|
+
|
|
|
+ for (Row row : rows) {
|
|
|
+ String tnoticeid = row.getString("tnoticeid");
|
|
|
+ row.put("fattachmentcount", attinfocountmap.containsKey(tnoticeid) ? attinfocountmap.get(tnoticeid).getRow(0).getInteger("fattachmentcount") : 0);
|
|
|
+ row.put("attinfos", noticecovermap.get(tnoticeid));
|
|
|
+ }
|
|
|
+
|
|
|
return getSucReturnObject().setDataByPaging(rows, sortfield).setFinalDo(DataPool.defaultdatalife, 1);
|
|
|
}
|
|
|
|
|
|
@@ -101,10 +115,10 @@ public class noticemag extends Controller {
|
|
|
String ftitle = content.getString("ftitle", "tnotice.ftitle", "标题");//标题
|
|
|
String fsummary = content.getString("fsummary", "tnotice.fsummary", "通告导语");//概述、导读
|
|
|
String fcontent = content.getString("fcontent", "tnotice.fcontent", "正文");//公告内容
|
|
|
- boolean fishomepage=content.getBooleanValue("fishomepage");//门户可见
|
|
|
+ boolean fishomepage = content.getBooleanValue("fishomepage");//门户可见
|
|
|
boolean fischeckagent = content.getBooleanValue("fcheckagent");//认证商户可见
|
|
|
- boolean fisagentsubuser=content.getBooleanValue("fisagentsubuser");//认证商户子账号可见
|
|
|
- boolean fisspecifiedrange=content.getBooleanValue("fisspecifiedrange");//指定认证商户范围
|
|
|
+ boolean fisagentsubuser = content.getBooleanValue("fisagentsubuser");//认证商户子账号可见
|
|
|
+ boolean fisspecifiedrange = content.getBooleanValue("fisspecifiedrange");//指定认证商户范围
|
|
|
boolean fissingleagent = content.getBooleanValue("fissingleagent");//个人商户可见
|
|
|
boolean fisontop = content.getBooleanValue("fisontop");//是否置顶
|
|
|
Date fbegdate = content.getDate("fbegdate");//开始时间
|