Просмотр исходного кода

直播间删除接口错误修复

沈静伟 4 лет назад
Родитель
Сommit
8d5d881a5f

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/live/SQL/直播间删除.sql

@@ -2,4 +2,5 @@ delete from tlive where siteid=$siteid$ and channelid=$channelid$
 delete from tlive_data where channelid=$channelid$
 delete from tlive_usercount where channelid=$channelid$
 delete from tlive_usermessages where channelid=$channelid$
-delete from tlive_viewlog where channelid=$channelid$
+delete from tlive_viewlog where channelid=$channelid$
+delete from tlive_sessiondata where channelid=$channelid$

+ 11 - 5
src/dsb/com/cnd3b/restcontroller/enterprise/live/live.java

@@ -213,12 +213,18 @@ public class live extends Controller {
         String channelid = rows.get(0).getString("channelid");
         Polyv polyv = new Polyv();
         if (polyv.deleteChannel(channelid)) {
-            SQLFactory sqlFactory=new SQLFactory(this,"Ö±²¥¼äɾ³ý");
-            sqlFactory.addParameter("siteid",siteid);
-            sqlFactory.addParameter("tliveid",tliveid);
-            dbConnect.runSqlUpdate(sqlFactory.getSQL());
+            SQLFactory sqlFactory = new SQLFactory(this, "Ö±²¥¼äɾ³ý");
+            sqlFactory.addParameter("siteid", siteid);
+            sqlFactory.addParameter("tliveid", tliveid);
+            String status = dbConnect.runSqlUpdate(sqlFactory.getSQL());
+            if ("true".equalsIgnoreCase(status)) {
+                return getSucReturnObject().toString();
+            } else {
+                return getErrReturnObject().setErrMsg(status).toString();
+            }
+        } else {
+            return getErrReturnObject().setErrMsg("Ö±²¥¼äɾ³ýʧ°Ü").toString();
         }
-        return getSucReturnObject().toString();
     }
 
     /**