Jelajahi Sumber

Merge branch 'develop'

sjw 3 tahun lalu
induk
melakukan
a28011e6cb

+ 6 - 4
src/dsb/com/cnd3b/restcontroller/customer/activity/activitysignup.java

@@ -29,11 +29,12 @@ public class activitysignup extends Controller {
         String fname = content.getString("fname", "tactivitysignup.fname", "姓名");
         String fidcard = content.getString("fidcard", "tactivitysignup.fidcard", "身份证号");
         String fphonenumber = content.getString("fphonenumber", "tactivitysignup.fphonenumber", "手机号");
-        String findustry = content.getString("findustry", "tactivitysignup.findustry", "行业");
-        String fcompname = content.getString("fcompname", "tactivitysignup.fcompname", "公司");
-        String frole = content.getString("frole", "tactivitysignup.frole", "职位");
-        String faddress = content.getString("faddress", "tactivitysignup.faddress", "住址");
+        String findustry = content.getString("findustry", 30, "行业");//"行业"
+        String fcompname = content.getString("fcompname", 30, "公司");
+        String frole = content.getString("frole", 30, "职位");
+        String faddress = content.getString("faddress", 30, "住址");
         String fchannel = content.getString("fchannel", "tactivitysignup.fchannel", "入会渠道");
+        String fquestionnaire = content.getString("fquestionnaire");//调查问卷
 
         PaoSetRemote tscanningSet = getP2ServerSystemPaoSet("tactivitysignup", "siteid='" + siteid + "' and tactivityid ='" + tactivityid + "' and tenterprise_userid='" + userid + "'");
         PaoRemote tscanning = null;
@@ -54,6 +55,7 @@ public class activitysignup extends Controller {
         tscanning.setValue("frole", frole, 11L);
         tscanning.setValue("faddress", faddress, 11L);
         tscanning.setValue("fchannel", fchannel, 11L);
+        tscanning.setValue("fquestionnaire", fquestionnaire, 11L);
         tscanningSet.save();
         return getSucReturnObject().toString();
     }

+ 13 - 2
src/dsb/com/cnd3b/restcontroller/customer/live/live.java

@@ -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();

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/activity/SQL/扫码枪列表查询.sql

@@ -1,3 +1,3 @@
-select t1.fecid,t1.flocation,t1.fnotes,t1.createdate,t2.ftitle from tscanning t1
+select t1.fecid,t1.flocation,t1.fnotes,t1.createdate,t2.ftitle,t2.tactivityid from tscanning t1
 inner join tactivity t2 on t1.siteid=t2.siteid and t1.tactivityid=t2.tactivityid
 where $where$ and t1.siteid=$siteid$

+ 7 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/activity/activitysignup.java

@@ -1,5 +1,6 @@
 package com.cnd3b.restcontroller.enterprise.activity;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.cnd3b.common.Controller;
 import com.cnd3b.common.D3bException;
@@ -55,6 +56,12 @@ public class activitysignup extends Controller {
             Rows visitrows = visitlistrows.get(signuprow.getString("tactivitysignupid"));
             signuprow.put("visittimes", visitrows.size());
             signuprow.put("visitmsg", visitrows);
+            String fquestionnaire = signuprow.getString("fquestionnaire");
+            if (fquestionnaire == null || fquestionnaire.equalsIgnoreCase("")) {
+                signuprow.put("fquestionnaire", new JSONArray());
+            } else {
+                signuprow.put("fquestionnaire", JSONArray.parse(signuprow.getString("fquestionnaire")));
+            }
         }
         return getSucReturnObject().setDataByPaging(signuprows).toString();
     }

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

@@ -7,6 +7,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 net.polyv.live.v1.entity.channel.operate.LiveChannelResponse;
 import p2.pao.PaoRemote;
 import p2.pao.PaoSetRemote;
@@ -82,6 +83,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);

+ 4 - 2
src/dsb/com/cnd3b/restcontroller/publicmethod/activity/scanning.java

@@ -41,7 +41,7 @@ public class scanning extends Controller {
         }
         String flocation = scanningRows.get(0).getString("flocation");
 
-        SQLFactory sqlFactory = new SQLFactory(this, "扫码枪列表查询", pageSize, pageNumber, "t1.flocation");
+        SQLFactory sqlFactory = new SQLFactory(this, "插入扫码入场信息");
         sqlFactory.addParameter("tactivityvisitmsid", createTableID("tactivityvisitmsg", "tactivityvisitmsid"));
         sqlFactory.addParameter("fecid", fecid);
         sqlFactory.addParameter("tactivitysignupid", tactivitysignupid);
@@ -50,8 +50,10 @@ public class scanning extends Controller {
 
         object.put("fname", fname);
         object.put("fphonenumber", fphonenumber);
-        object.put("ftime", sysdate);
+        object.put("fentrydate", getDateTime_Str());
         object.put("flocation", flocation);
+        object.put("fecid", fecid);
+        object.put("tactivitysignupid", tactivitysignupid);
 
         return getSucReturnObject().setData(object).toString();
     }

+ 13 - 0
src/dsb/com/cnd3b/utility/polyv/Polyv.java

@@ -97,6 +97,19 @@ public class Polyv extends BaseClass {
         return null;
     }
 
+    public LiveChannelInfoResponse getChannelInfo(String channelId) {
+        LiveChannelInfoRequest liveChannelRequest = new LiveChannelInfoRequest();
+        try {
+            liveChannelRequest.setChannelId(channelId);
+            LiveChannelInfoResponse liveChannelInfoResponse = new LiveChannelOperateServiceImpl().getChannelInfo(liveChannelRequest);
+            liveChannelInfoResponse.getChannelPasswd();
+            return liveChannelInfoResponse;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
     /**
      * ÐÞ¸ÄÆµµÀ·ÖÀ༰Ãû³Æ
      *