|
@@ -179,7 +179,7 @@ public class homepage extends Controller {
|
|
|
* 获取管理端发布的最新通告
|
|
|
*/
|
|
|
public String getNewestNoticeList() {
|
|
|
- SQLFactory sql = new SQLFactory(this, "最新管理端发布的通告",pageSize,pageNumber,"t1.createdate DESC");
|
|
|
+ SQLFactory sql = new SQLFactory(this, "最新管理端发布的通告", pageSize, pageNumber, "t1.createdate DESC");
|
|
|
Rows rows = sql.runSqlQuery();
|
|
|
for (Row row : rows) {
|
|
|
row.put("attinfos", getAttachmentUrl("tnotice", row.getString("tnoticeid")));
|
|
@@ -208,6 +208,7 @@ public class homepage extends Controller {
|
|
|
|
|
|
/**
|
|
|
* 新增招商管理表单
|
|
|
+ *
|
|
|
* @return
|
|
|
* @throws P2Exception
|
|
|
*/
|
|
@@ -223,14 +224,14 @@ public class homepage extends Controller {
|
|
|
|
|
|
PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tbusiness");
|
|
|
PaoRemote paoRemote = paoSetRemote.addAtEnd();
|
|
|
- paoRemote.setValue("province",province,11L);
|
|
|
- paoRemote.setValue("city",city,11L);
|
|
|
- paoRemote.setValue("county",county,11L);
|
|
|
- paoRemote.setValue("address",address,11L);
|
|
|
- paoRemote.setValue("fname",fname,11L);
|
|
|
- paoRemote.setValue("fphone",fphone,11L);
|
|
|
- paoRemote.setValue("fnote",fnote,11L);
|
|
|
- paoRemote.setValue("tbusinessid",paoRemote.getUniqueIDValue(),11L);
|
|
|
+ paoRemote.setValue("province", province, 11L);
|
|
|
+ paoRemote.setValue("city", city, 11L);
|
|
|
+ paoRemote.setValue("county", county, 11L);
|
|
|
+ paoRemote.setValue("address", address, 11L);
|
|
|
+ paoRemote.setValue("fname", fname, 11L);
|
|
|
+ paoRemote.setValue("fphone", fphone, 11L);
|
|
|
+ paoRemote.setValue("fnote", fnote, 11L);
|
|
|
+ paoRemote.setValue("tbusinessid", paoRemote.getUniqueIDValue(), 11L);
|
|
|
|
|
|
paoSetRemote.save();
|
|
|
|
|
@@ -245,7 +246,7 @@ public class homepage extends Controller {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public String getHotAgentsList() {
|
|
|
+ public String getHotAgentsList() {
|
|
|
SQLFactory agentlistSql = null;
|
|
|
if (content.containsKey("ftype") && !"".equals(content.getString("ftype"))) {
|
|
|
String ftype = content.getString("ftype");
|
|
@@ -279,7 +280,7 @@ public class homepage extends Controller {
|
|
|
}
|
|
|
SQLFactory prodlistSql = new SQLFactory(this, "新品列表", pageSize, pageNumber, "t1.ftype,t1.frownum");
|
|
|
|
|
|
- if(prodlistSql == null){
|
|
|
+ if (prodlistSql == null) {
|
|
|
return getErrReturnObject().setErrMsg("prodlistSql is null").toString();
|
|
|
}
|
|
|
prodlistSql.addParameter("siteid", siteid);
|
|
@@ -292,4 +293,70 @@ public class homepage extends Controller {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 门户搜索
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String searchPortalInfo() {
|
|
|
+ JSONObject resultObject = new JSONObject();
|
|
|
+ String keyStr = content.getString("keyStr");
|
|
|
+ if (keyStr == null || keyStr.equals("")) {
|
|
|
+ return getErrReturnObject().setErrMsg("搜索关键词不能为空").toString();
|
|
|
+ }
|
|
|
+ String ftype = content.getString("ftype");
|
|
|
+ if (ftype == null) {
|
|
|
+ ftype = "";
|
|
|
+ }
|
|
|
+ //查询直播
|
|
|
+ if (ftype.equals("1") || ftype.equals("")) {
|
|
|
+ SQLFactory sqlFactory_tlive = new SQLFactory(this, "搜索_直播");
|
|
|
+ sqlFactory_tlive.addParameter("siteid", siteid);
|
|
|
+ sqlFactory_tlive.addParameter("keyStr", "%" + keyStr + "%");
|
|
|
+ Rows row_tlive = dbConnect.runSqlQuery(sqlFactory_tlive.getSQL());
|
|
|
+ resultObject.put("tlive", row_tlive);
|
|
|
+ } else {
|
|
|
+ resultObject.put("tlive", new Rows());
|
|
|
+ }
|
|
|
+ //查询供需
|
|
|
+ if (ftype.equals("2") || ftype.equals("")) {
|
|
|
+ SQLFactory sqlFactory_tsupplyanddemand = new SQLFactory(this, "搜索_供需");
|
|
|
+ sqlFactory_tsupplyanddemand.addParameter("siteid", siteid);
|
|
|
+ sqlFactory_tsupplyanddemand.addParameter("keyStr", "%" + keyStr + "%");
|
|
|
+ Rows row_tsupplyanddemand = dbConnect.runSqlQuery(sqlFactory_tsupplyanddemand.getSQL());
|
|
|
+ //附件
|
|
|
+ RowsMap attinfoRowsMap = getAttachmentUrl("tsupplyanddemand", row_tsupplyanddemand.toArrayList("tsupplyanddemandid"));
|
|
|
+ for (Row row : row_tsupplyanddemand) {
|
|
|
+ //附件信息
|
|
|
+ row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
|
|
|
+ row.put("headportraiturl", getHeadPic(row.getLong("tenterprise_userid")));
|
|
|
+ }
|
|
|
+ resultObject.put("tsupplyanddemand", row_tsupplyanddemand);
|
|
|
+ } else {
|
|
|
+ resultObject.put("tsupplyanddemand", new Rows());
|
|
|
+ }
|
|
|
+
|
|
|
+ //查询通告
|
|
|
+ if (ftype.equals("3") || ftype.equals("")) {
|
|
|
+ SQLFactory sqlFactory_tnotice = new SQLFactory(this, "搜索_通告");
|
|
|
+ sqlFactory_tnotice.addParameter("siteid", siteid);
|
|
|
+ sqlFactory_tnotice.addParameter("keyStr", "%" + keyStr + "%");
|
|
|
+ Rows row_notice = dbConnect.runSqlQuery(sqlFactory_tnotice.getSQL());
|
|
|
+
|
|
|
+ //附件信息
|
|
|
+ RowsMap attinfoRowsMap = getAttachmentUrl("tnotice", row_notice.toArrayList("tnoticeid"));
|
|
|
+ for (Row row : row_notice) {
|
|
|
+ row.put("attinfos", attinfoRowsMap.get(row.getString("tnoticeid")));
|
|
|
+ row.put("headportraiturl", getHeadPic(row.getLong("tenterprise_userid")));
|
|
|
+ }
|
|
|
+
|
|
|
+ resultObject.put("TNOTICE", row_notice);
|
|
|
+ } else {
|
|
|
+ resultObject.put("TNOTICE", new Rows());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(resultObject).toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|