|
|
@@ -8,6 +8,7 @@ import com.cnd3b.common.data.Rows;
|
|
|
import com.cnd3b.common.data.SQLFactory;
|
|
|
import com.cnd3b.common.data.db.DataPool;
|
|
|
import com.cnd3b.utility.polyv.Polyv;
|
|
|
+import net.polyv.live.v1.entity.channel.operate.LiveChannelInfoResponse;
|
|
|
import p2.pao.PaoRemote;
|
|
|
import p2.pao.PaoSetRemote;
|
|
|
import p2.util.P2Exception;
|
|
|
@@ -83,6 +84,16 @@ public class live extends Controller {
|
|
|
*/
|
|
|
public String queryChannelMain() {
|
|
|
long tliveid = content.getLong("tliveid");
|
|
|
+ Rows channelidrows = dbConnect.runSqlQuery("select channelid from tlive where tliveid='" + tliveid + "'");
|
|
|
+ if (!channelidrows.isEmpty()) {
|
|
|
+ String channelid = channelidrows.get(0).getString("channelid");
|
|
|
+ Polyv polyv = new Polyv();
|
|
|
+ LiveChannelInfoResponse liveChannelInfoResponse = polyv.getChannelInfo(channelid);
|
|
|
+ if (liveChannelInfoResponse != null) {
|
|
|
+ String channelpasswd = liveChannelInfoResponse.getChannelPasswd();
|
|
|
+ dbConnect.runSqlUpdate("update tlive set channelpasswd='" + channelpasswd + "' where tliveid='" + tliveid + "'");
|
|
|
+ }
|
|
|
+ }
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "直播详情查询");
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("tliveid", tliveid);
|
|
|
@@ -156,7 +167,7 @@ public class live extends Controller {
|
|
|
//人次
|
|
|
liveuv = paoRemote.getInt("liveuv");
|
|
|
//时长
|
|
|
- duration = paoRemote.getInt("duration") ;
|
|
|
+ duration = paoRemote.getInt("duration");
|
|
|
}
|
|
|
|
|
|
JSONObject resultObject = new JSONObject();
|
|
|
@@ -271,7 +282,7 @@ public class live extends Controller {
|
|
|
//人次
|
|
|
liveuv = paoRemote.getInt("liveuv");
|
|
|
//时长
|
|
|
- duration = paoRemote.getInt("duration") ;
|
|
|
+ duration = paoRemote.getInt("duration");
|
|
|
}
|
|
|
|
|
|
JSONObject resultObject = new JSONObject();
|