Pārlūkot izejas kodu

活动直播间总数查询错误修复
消息发送错误修复

沈静伟 4 gadi atpakaļ
vecāks
revīzija
f3c960e65c

+ 10 - 2
src/dsb/com/cnd3b/common/Controller.java

@@ -735,7 +735,11 @@ public class Controller extends BaseClass {
      * @param fmessage  ÏûÏ¢ÄÚÈÝ
      */
     public String createSystemMessageByAgentsid(String ftype, String ftitle, String fmessage, long tagentsid) {
-        return createSystemMessage(ftype, ftitle, fmessage, getMainUser(tagentsid).getLong("tenterprise_usersid"));
+        Row row = getMainUser(tagentsid);
+        if (row != null) {
+            return createSystemMessage(ftype, ftitle, fmessage, row.getLong("tenterprise_usersid"));
+        }
+        return "false";
     }
 
     /**
@@ -747,7 +751,11 @@ public class Controller extends BaseClass {
      * @param fmessage  ÏûÏ¢ÄÚÈÝ
      */
     public String createSystemMessageByAgentsid(String ftype, String ftitle, String fmessage, long objectid, String objectname, long tagentsid) {
-        return createSystemMessage(ftype, ftitle, fmessage, objectid, objectname, getMainUser(tagentsid).getLong("tenterprise_usersid"));
+        Row row = getMainUser(tagentsid);
+        if (row != null) {
+            return createSystemMessage(ftype, ftitle, fmessage, objectid, objectname, row.getLong("tenterprise_usersid"));
+        }
+        return "false";
     }
 
     public static HashMap<String, Row> tableColumnRowmap = new HashMap<>();

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/live/SQL/活动直播间总数查询.sql

@@ -1 +1 @@
-select count(0)fcount from tlive where livestatus='live' and tactivityid=$tactivityid$ and siteid=$siteid
+select count(0)fcount from tlive where livestatus='live' and tactivityid=$tactivityid$ and siteid=$siteid$