Преглед на файлове

门户下的供需列表查询支持标题模糊查询,供需详情查询记录阅读次数

吴志根 преди 4 години
родител
ревизия
9987af84c5

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/bannermag/bannermag.java

@@ -50,7 +50,8 @@ public class bannermag extends Controller {
         SQLFactory locationSQL = new SQLFactory(this, "¹ã¸æÎ»²éѯ");
         locationSQL.addParameter("siteid", siteid);
         locationSQL.addParameter("fclienttype", fclienttype);
-        Rows locationrows = dbConnect.runSqlQuery(locationSQL.getSQL());
+        String sql = locationSQL.getSQL();
+        Rows locationrows = dbConnect.runSqlQuery(sql);
         SQLFactory bannerSQl = new SQLFactory(this, "ÂÖ²¥Í¼²éѯ");
         bannerSQl.addParameter("siteid", siteid);
         bannerSQl.addParameter_in("tbannerlocationid", locationrows.toArrayList("tbannerlocationid"));

+ 11 - 0
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/homepage.java

@@ -60,6 +60,11 @@ public class homepage extends Controller {
         StringBuffer where = new StringBuffer(" 1=1 ");
         if (content.containsKey("where")) {
             JSONObject whereObject = content.getJSONObject("where");
+            if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
+                where.append(" and(");
+                where.append("t1.ftitle like'%").append(whereObject.getString("condition")).append("%' ");
+                where.append(")");
+            }
             if (whereObject.containsKey("ftype") && !"".equals(whereObject.getString("ftype"))) {
                 where.append(" and t1.ftype ='").append(whereObject.getString("ftype")).append("' ");
             }
@@ -87,6 +92,12 @@ public class homepage extends Controller {
         long tsupplyanddemandid = content.getLongValue("tsupplyanddemandid");
         long tagentsid = content.getLongValue("tagentsid");
 
+        /**
+         * ÔĶÁ´ÎÊý+1
+         */
+        dbConnect.runSqlUpdate("update tsupplyanddemand set freadtimes=isnull(freadtimes,0)+1 where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
+
+
         SQLFactory sqlFactory = new SQLFactory(this, "¹©ÐèÏêÇé²éѯ");
         sqlFactory.addParameter("siteid", siteid);
         sqlFactory.addParameter("tagentsid", tagentsid);