|
|
@@ -42,4 +42,29 @@ public class bannermag extends Controller {
|
|
|
}
|
|
|
return getSucReturnObject().setData(locationrows).toString();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取门户广告位轮播图
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String getPortalBannerList() {
|
|
|
+ //fclienttype:web,MOBILE
|
|
|
+ SQLFactory locationSQL = new SQLFactory(this, "广告位查询");
|
|
|
+ locationSQL.addParameter("siteid", siteid);
|
|
|
+ Rows locationrows = dbConnect.runSqlQuery(locationSQL.getSQL());
|
|
|
+ SQLFactory bannerSQl = new SQLFactory(this, "轮播图查询");
|
|
|
+ bannerSQl.addParameter("siteid", siteid);
|
|
|
+ bannerSQl.addParameter_in("tbannerlocationid", locationrows.toArrayList("tbannerlocationid"));
|
|
|
+ RowsMap bannermap = dbConnect.runSqlQuery(bannerSQl.getSQL()).toRowsMap("tbannerlocationid");
|
|
|
+ for (Row locationrow : locationrows) {
|
|
|
+ Rows bannerRows = bannermap.get(locationrow.getString("tbannerlocationid"));
|
|
|
+ for (Row bannerrow : bannerRows) {
|
|
|
+ bannerrow.put("attinfos", getAttachmentUrl("tbannermag", bannerrow.getString("tbannermagid")));
|
|
|
+ }
|
|
|
+ locationrow.put("banner", bannerRows);
|
|
|
+ }
|
|
|
+ return getSucReturnObject().setData(locationrows).toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|