ソースを参照

Merge remote-tracking branch 'origin/develop' into develop

沈静伟 3 年 前
コミット
eb9558e8a6

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/live/SQL/实时聊天列表.sql

@@ -14,4 +14,4 @@ SELECT t1.pic,
        CONVERT(varchar (100), DATEADD(S, convert(float, t1.time) / 1000, '1970-01-01 08:00'), 120) as datetime
 from tlive_usermessages AS t1
 WHERE t1.channelid = $channelid$
-  AND t1.time = $time$
+  AND t1.time > $time$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/live/live.java

@@ -391,7 +391,7 @@ public class live extends Controller {
      */
     public String getRealTimeMessageList() {
         String channelid = content.getString("channelid");
-        Long time = getDateTime().getTime();
+        Long time = getDateTime().getTime() - 1*60*1000;
         SQLFactory sqlFactory = new SQLFactory(this, "ʵʱÁÄÌìÁбí", pageSize, pageNumber, "t1.tlive_usermessagid DESC");
         sqlFactory.addParameter("channelid", channelid);
         sqlFactory.addParameter("time", time);

+ 14 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/招商管理列表.sql

@@ -0,0 +1,14 @@
+SELECT t1.fname,
+       t1.fphone,
+       t1.address,
+       t1.city,
+       t1.county,
+       t1.createdate,
+       t1.province,
+       t1.tbusinessid,
+       t1.fnote
+FROM tbusiness AS t1
+
+
+
+

+ 49 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/system/business.java

@@ -0,0 +1,49 @@
+package com.cnd3b.restcontroller.enterprise.system;
+
+import com.alibaba.fastjson.JSONObject;
+import com.cnd3b.common.Controller;
+import com.cnd3b.common.data.Rows;
+import com.cnd3b.common.data.SQLFactory;
+
+public class business extends Controller {
+    /**
+     * 构造函数
+     *
+     * @param content
+     */
+    public business(JSONObject content) {
+        super(content);
+    }
+
+
+    /**
+     * 招商管理列表
+     *
+     * @return
+     */
+    public String getBusinessList() {
+        SQLFactory sqlFactory = new SQLFactory(this, "招商管理列表", pageSize, pageNumber, "t1.createdate DESC");
+        Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
+        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
+    }
+
+    /**
+     * 招商管理-删除
+     *
+     * @return
+     */
+    public String deleteBusiness() {
+        String tbusinessid = content.getString("tbusinessid");
+        String sql = "DELETE FROM tbusiness WHERE tbusinessid = '" + tbusinessid + "'";
+
+        String response = dbConnect.runSqlUpdate(sql);
+        if (response.equals("true")) {
+            return getSucReturnObject().toString();
+        } else {
+            return getErrReturnObject().toString();
+        }
+
+
+    }
+
+}

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

@@ -7,6 +7,9 @@ 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 homepage extends Controller {
     public homepage(JSONObject content) {
@@ -181,4 +184,37 @@ public class homepage extends Controller {
         return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
     }
 
+    /**
+     * ÐÂÔöÕÐÉ̹ÜÀí±íµ¥
+     * @return
+     * @throws P2Exception
+     */
+    public String insertBusiness() throws P2Exception {
+
+        String province = content.getString("province");
+        String city = content.getString("city");
+        String county = content.getString("county");
+        String address = content.getString("address");
+        String fname = content.getString("fname");
+        String fphone = content.getString("fphone");
+        String fnote = content.getString("fnote");
+
+        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);
+
+        paoSetRemote.save();
+
+
+        return getSucReturnObject().toString();
+
+    }
+
 }