Ver código fonte

实时直播聊天列表延迟一分钟获取

吴志根 3 anos atrás
pai
commit
b9ccc1b395

+ 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);