|
@@ -179,12 +179,14 @@ public class homepage extends Controller {
|
|
|
* 获取管理端发布的最新通告
|
|
|
*/
|
|
|
public String getNewestNoticeList() {
|
|
|
- SQLFactory sql = new SQLFactory(this, "最新管理端发布的通告", pageSize, pageNumber, "t1.createdate DESC");
|
|
|
- Rows rows = sql.runSqlQuery();
|
|
|
+ SQLFactory sqlTop = new SQLFactory(this, "最新管理端发布的通告_置顶");
|
|
|
+ Rows rows = sqlTop.runSqlQuery();
|
|
|
+ SQLFactory sql = new SQLFactory(this, "最新管理端发布的通告");
|
|
|
+ rows.addAll(sql.runSqlQuery());
|
|
|
for (Row row : rows) {
|
|
|
row.put("attinfos", getAttachmentUrl("tnotice", row.getString("tnoticeid")));
|
|
|
}
|
|
|
- return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -315,7 +317,7 @@ public class homepage extends Controller {
|
|
|
sqlFactory_tlive.addParameter("keyStr", "%" + keyStr + "%");
|
|
|
Rows row_tlive = dbConnect.runSqlQuery(sqlFactory_tlive.getSQL());
|
|
|
|
|
|
- for(Row row:row_tlive){
|
|
|
+ for (Row row : row_tlive) {
|
|
|
//观看次数(次)
|
|
|
String channelid = row.getString("channelid");
|
|
|
//观看人数(人)
|
|
@@ -376,4 +378,16 @@ public class homepage extends Controller {
|
|
|
return rows.isEmpty() ? 0 : rows.get(0).getLong(fieldname);
|
|
|
}
|
|
|
|
|
|
+ public String getNewProduct() {
|
|
|
+ String fprodclassname = content.getString("fprodclassname");
|
|
|
+ SQLFactory prodlistSql = new SQLFactory(this, "前十新品");
|
|
|
+ prodlistSql.addParameter("siteid", siteid);
|
|
|
+ prodlistSql.addParameter("fprodclassname", fprodclassname);
|
|
|
+ Rows rows = dbConnect.runSqlQuery(prodlistSql.getSQL());
|
|
|
+ for (Row row : rows) {
|
|
|
+ row.put("attinfos", getAttachmentUrl("tagents_product", row.getString("tagents_productid")));
|
|
|
+ }
|
|
|
+ return getSucReturnObject().setData(rows).saveToDataPool(10).toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|