| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package com.cnd3b.restcontroller.publicmethod.bannermag;
- 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 p2.pao.PaoRemote;
- import p2.pao.PaoSetRemote;
- import p2.util.P2Exception;
- public class bannermag extends Controller {
- public bannermag(JSONObject content) {
- super(content);
- }
- /**
- * ÂÖ²¥Î»²éѯ
- *
- * @return
- */
- public String query_bannerlocationlist() {
- this.siteid = content.getString("siteid");
- String fclienttype = content.getString("fclienttype");
- SQLFactory locationSQL = new SQLFactory(this, "ÂÖ²¥¹ã¸æÎ»²éѯ");
- locationSQL.addParameter("siteid", siteid);
- locationSQL.addParameter("fclienttype", fclienttype);
- 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();
- }
- }
|