Procházet zdrojové kódy

直播申请列表查询新增直播间id返回

沈静伟 před 4 roky
rodič
revize
dc153e52e2

+ 0 - 4
src/dsb/com/cnd3b/restcontroller/enterprise/data/analysis.java

@@ -9,13 +9,9 @@ import com.cnd3b.common.parameter.parameter;
 import com.cnd3b.common.websocket.WebClientSocket;
 
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import static com.cnd3b.common.parameter.parameter.parameter_init;
-import static com.cnd3b.common.parameter.parameter.websocketClients;
-
 public class analysis extends Controller {
     public analysis(JSONObject content) {
         super(content);

+ 4 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/live/SQL/直播申请列表查询.sql

@@ -1 +1,4 @@
-SELECT * FROM tliveapply
+select t1.tliveapplyid,t1.createby,t1.createdate,t1.siteid,t1.changeby,t1.changedate,
+t1.tagentsid,t1.tactivityid,t1.checkby,t1.checkdate,t1.fstatus,t1.fnotes,t1.fissecret,t2.tliveid,t2.channelid from tliveapply t1
+left join tlive t2 on t1.tliveapplyid=t2.tliveapplyid and t1.siteid=t2.siteid
+order by checkdate desc

+ 7 - 6
src/dsb/com/cnd3b/restcontroller/enterprise/live/live.java

@@ -122,6 +122,9 @@ public class live extends Controller {
             tlive.setValue("channelcoverimageurl", polyv.getChannelImage(liveChannelResponse.getChannelId(), "unStart"));//封面图地址
             tlive.setValue("createby", username);
             tlive.setValue("createdate", sysdate);
+            if (content.containsKey("tliveapplyid")) {
+                tlive.setValue("tliveapplyid", content.getLong("tliveapplyid"));
+            }
             content.put("tliveid", tlive.getUniqueIDValue());
             tliveSet.save();
 
@@ -174,7 +177,8 @@ public class live extends Controller {
         if (secretKey == null) {
             return getErrReturnObject().toString();
         } else {
-            dbConnect.runSqlUpdate("update tlive set fisneedauth=1,secretkey='" + secretKey + "' where siteid='" + siteid + "' and tliveid='" + tliveid + "'");
+            String fliveshowurl = "http://123.60.111.36:8080/customer/index.html#/authLiveLogin?tliveid=" + tliveid;
+            dbConnect.runSqlUpdate("update tlive set fliveshowurl='" + fliveshowurl + "', fisneedauth=1,secretkey='" + secretKey + "' where siteid='" + siteid + "' and tliveid='" + tliveid + "'");
             //需将改为新的直播观看地址
             return queryChannelMain();
         }
@@ -264,12 +268,8 @@ public class live extends Controller {
      * @return
      */
     public String getSYLiveApplyList() {
-
-        SQLFactory sqlFactory = new SQLFactory(this, "直播申请列表查询", pageSize, pageNumber, "changedate");
-
+        SQLFactory sqlFactory = new SQLFactory(this, "直播申请列表查询", pageSize, pageNumber, "t1.changedate");
         Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
-
-
         return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
     }
 
@@ -298,6 +298,7 @@ public class live extends Controller {
                 paoRemote.setValue("CHECKDATE", getDateTime_Str());
                 paoSetRemote.save();
                 //开启直播
+                content.put("tliveapplyid", tliveapplyid);
                 content.put("tagentsid", tagentsid);
                 content.put("channelname", "私域直播");
                 content.put("categoryid", getCategoryId("私域直播"));