Explorar el Código

新增合作方式调整接口

沈静伟 hace 4 años
padre
commit
86f1eff6ed

+ 17 - 0
src/dsb/com/cnd3b/restcontroller/customer/tagents/tagents.java

@@ -191,6 +191,23 @@ public class tagents extends Controller {
         return getSucReturnObject().toString();
     }
 
+    /**
+     * 合作方式调整
+     *
+     * @return
+     * @throws P2Exception
+     */
+    public String update_cooperation() throws P2Exception {
+        long tcooperationagentsid = content.getLong("tcooperationagentsid");//合作商ID
+        int ftype = content.getInteger("ftype");//合作类型
+        PaoSetRemote tagents_cooperationSet = getP2ServerSystemPaoSet("tagents_cooperation", "tagentsid='" + tagentsid + "' and tcooperationagentsid='" + tcooperationagentsid + "'");
+
+        PaoRemote tagents_cooperation = tagents_cooperationSet.getPao(0);
+        tagents_cooperation.setValue("ftype", ftype, 11L);//需要发布tcooperationagentsid商户进行设置,1:上游;2下游;3双向
+        tagents_cooperationSet.save();
+        return getSucReturnObject().toString();
+    }
+
     /**
      * 解除合作关系
      * tagentsID为提供方,tcooperationagentsid为申请方

+ 1 - 1
src/dsb/com/cnd3b/service/SQL/场次直播概览统计数据插入.sql

@@ -12,7 +12,7 @@ where channelid =$channelid$ and sessionid =$sessionid$
 insert into tlive_sessiondata(rmkenable, channelid,sessionid,
                        name, starttime, duration, liveuv, livepv,
                        playbackpv, playbackuv, createdate, changedate)
-select 0,$channelid$,$sessionid$
+select 0,$channelid$,$sessionid$,
     $name$,$starttime$,$duration$,$liveuv$,$livepv$,
     $playbackpv$,$playbackuv$,getdate(),getdate()
 where not exists (select * from tlive_sessiondata where channelid =$channelid$ and sessionid =$sessionid$)