|
@@ -156,29 +156,29 @@ public class notice extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
-// @API(title = "通告详情")
|
|
|
-// public String queryNoticeMain() throws YosException {
|
|
|
-// Long sat_noticeid = content.getLong("sat_noticeid");
|
|
|
-// // 新增记录
|
|
|
-// addReadRecord(sat_noticeid);
|
|
|
-// SQLFactory sqlFactory = new SQLFactory(this, "通告详情查询");
|
|
|
-// sqlFactory.addParameter("sat_noticeid", sat_noticeid);
|
|
|
-// sqlFactory.addParameter("userid", userid);
|
|
|
-// Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
-//
|
|
|
-// // 附件
|
|
|
-// ArrayList<Long> ids = rows.toArrayList("sat_noticeid", new ArrayList<Long>());
|
|
|
-// RowsMap attRowsMap = getAttachmentUrl("sat_notice", ids);
|
|
|
-// for (Row row : rows) {
|
|
|
-// Rows Rows = attRowsMap.get(row.getString("sat_noticeid"));
|
|
|
-// if (Rows.isEmpty()) {
|
|
|
-// row.put("attinfos", new Rows());
|
|
|
-// } else {
|
|
|
-// row.put("attinfos", Rows);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return getSucReturnObject().setData(rows.get(0)).toString();
|
|
|
-// }
|
|
|
+ @API(title = "通告详情")
|
|
|
+ public String queryNoticeMain() throws YosException {
|
|
|
+ Long sat_noticeid = content.getLong("sat_noticeid");
|
|
|
+ // 新增记录
|
|
|
+ addReadRecord(sat_noticeid);
|
|
|
+ SQLFactory sqlFactory = new SQLFactory(this, "通告详情查询");
|
|
|
+ sqlFactory.addParameter("sat_noticeid", sat_noticeid);
|
|
|
+ sqlFactory.addParameter("userid", userid);
|
|
|
+ Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
+
|
|
|
+ // 附件
|
|
|
+ ArrayList<Long> ids = rows.toArrayList("sat_noticeid", new ArrayList<Long>());
|
|
|
+ RowsMap attRowsMap = getAttachmentUrl("sat_notice", ids);
|
|
|
+ for (Row row : rows) {
|
|
|
+ Rows Rows = attRowsMap.get(row.getString("sat_noticeid"));
|
|
|
+ if (Rows.isEmpty()) {
|
|
|
+ row.put("attinfos", new Rows());
|
|
|
+ } else {
|
|
|
+ row.put("attinfos", Rows);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getSucReturnObject().setData(rows.get(0)).toString();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 查询阅读记录(通告留言和打分)
|