瀏覽代碼

Merge branch 'develop'

# Conflicts:
#	src/dsb/com/cnd3b/restcontroller/customer/live/live.java
#	src/dsb/com/cnd3b/restcontroller/enterprise/live/live.java
沈静伟 3 年之前
父節點
當前提交
0f09429900

+ 0 - 1
src/dsb/com/cnd3b/common/Controller.java

@@ -535,7 +535,6 @@ public class Controller extends BaseClass {
 //        if (!headPicMap.containsKey(userid)) {
             Rows rows = getAttachmentUrl("tenterprise_users", String.valueOf(userid), "headportrait");
             if (!rows.isEmpty()) {
-                System.err.println(rows.get(0).getString("fobsurl_thumbnail"));
                 if(rows.get(0).getString("fobsurl_thumbnail").equals("")){
                     headPicMap.put(userid, rows.get(0).getString("fobsurl"));
                 }else{

+ 82 - 0
src/dsb/com/cnd3b/restcontroller/customer/activity/SignupUpload.java

@@ -0,0 +1,82 @@
+package com.cnd3b.restcontroller.customer.activity;
+
+import com.alibaba.fastjson.JSONObject;
+import com.cnd3b.common.Controller;
+import com.cnd3b.common.D3bException;
+import com.cnd3b.common.data.Row;
+import com.cnd3b.common.data.Rows;
+import com.cnd3b.common.parameter.parameter;
+import com.cnd3b.restcontroller.publicmethod.users.Users;
+import p2.pao.PaoRemote;
+import p2.pao.PaoSetRemote;
+import p2.util.P2Exception;
+
+/**
+ * 历史注册信息导入
+ */
+public class SignupUpload extends Controller {
+    public SignupUpload(JSONObject content) {
+        super(content);
+    }
+
+    /**
+     * 访客登记注册
+     *
+     * @return
+     * @throws D3bException
+     * @throws P2Exception
+     */
+    public String upload() throws D3bException, P2Exception {
+        long tactivityid = content.getLong("tactivityid");//活动ID
+        Rows rows = dbConnect.runSqlQuery("select t1.name,t1.idcard,t1.phonenumber,t1.address,t1.compname,t1.id,isnull(max(t2.tenterprise_userid),0) as tenterprise_userid from signupload t1 " +
+                "left join tenterprise_users t2 on t1.phonenumber=t2.fphonenumber " +
+                "where t1.status=1 and t1.tactivityid='" + tactivityid + "' group by t1.name,t1.idcard,t1.phonenumber,t1.address,t1.compname,t1.id ");
+        for (Row row : rows) {
+            String name = row.getString("name");
+            String idcard = row.getString("idcard");
+            String phonenumber = row.getString("phonenumber");
+            String address = row.getString("address");
+            String compname = row.getString("compname");
+            long tenterprise_userid = row.getLong("tenterprise_userid");
+            int id = row.getInteger("id");
+            if (tenterprise_userid == 0) {
+                //如果该手机号没有对应的账号,则生成账号信息
+                PaoSetRemote tagentsSet = getP2ServerSystemPaoSet("tagents");
+                PaoRemote tagents = tagentsSet.addAtEnd();
+                tagents.setValue("siteid", siteid, 11L);//企业ID
+                tagents.setValue("createdate", getDateTime(), 11L);//录入时间
+                tagents.setValue("fphonenumber", phonenumber, 11L);
+                tagents.setValue("fjoindate", getDateTime(), 11L);
+                tagents.setValue("fcontact", name, 11L);
+                tagents.setValue("faddress", address, 11L);
+                tagents.setValue("ftype", "个人", 11L);
+                tagentsSet.save();
+                tenterprise_userid = getMainUser(tagents.getUniqueIDValue()).getLong("tenterprise_userid");
+            }
+            PaoSetRemote tscanningSet = getP2ServerSystemPaoSet("tactivitysignup", "siteid='" + siteid + "' and tactivityid ='" + tactivityid + "' and tenterprise_userid='" + tenterprise_userid + "'");
+            PaoRemote tscanning = null;
+            if (tscanningSet.isEmpty()) {
+                tscanning = tscanningSet.addAtEnd();
+                tscanning.setValue("tenterprise_userid", tenterprise_userid, 11L);
+                tscanning.setValue("siteid", siteid, 11L);
+                tscanning.setValue("createdate", sysdate, 11L);
+                tscanning.setValue("tactivityid", tactivityid, 11L);
+            } else {
+                tscanning = tscanningSet.getPao(0);
+            }
+            tscanning.setValue("fname", name, 11L);
+            tscanning.setValue("fidcard", idcard, 11L);
+            tscanning.setValue("fphonenumber", phonenumber, 11L);
+            //tscanning.setValue("findustry", findustry, 11L);
+            tscanning.setValue("fcompname", compname, 11L);
+            //tscanning.setValue("frole", frole, 11L);
+            tscanning.setValue("faddress", address, 11L);
+            //tscanning.setValue("fchannel", fchannel, 11L);
+            tscanning.setValue("fquestionnaire", "[]", 11L);
+            tscanningSet.save();
+
+            dbConnect.runSqlUpdate("update signupload set status=10 where id='" + id + "'");
+        }
+        return getSucReturnObject().toString();
+    }
+}

+ 0 - 10
src/dsb/com/cnd3b/restcontroller/customer/live/live.java

@@ -98,16 +98,6 @@ public class live extends Controller {
         } catch ( Exception e) {
             e.printStackTrace();
         }
-        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);

+ 0 - 6
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/supplyanddemand.java

@@ -73,7 +73,6 @@ public class supplyanddemand extends Controller {
         sqlFactory.addParameter("userid", userid);
         sqlFactory.addParameter_SQL("where", where);
         String sql = sqlFactory.getSQL();
-//        System.err.println(sqlFactory.getSQL());
         Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
         RowsMap attinfoRowsMap = getAttachmentUrl("tsupplyanddemand", rows.toArrayList("tsupplyanddemandid"));
 
@@ -82,8 +81,6 @@ public class supplyanddemand extends Controller {
         dialoglistSQL.addParameter("siteid", siteid);
         dialoglistSQL.addParameter("userid", userid);
         dialoglistSQL.addParameter_in("tsupplyanddemandid", rows.toArrayList("tsupplyanddemandid"));
-//        String sql = dialoglistSQL.getSQL();
-//        System.err.println(sql);
 
         Rows dialogrows = dbConnect.runSqlQuery(dialoglistSQL.getSQL());
 
@@ -91,8 +88,6 @@ public class supplyanddemand extends Controller {
         timnewmsgSQL.addParameter("siteid", siteid);
         timnewmsgSQL.addParameter("userid", userid);
         timnewmsgSQL.addParameter_in("timdialogid", dialogrows.toArrayList("timdialogid"));
-//        String sql2 = timnewmsgSQL.getSQL();
-//        System.err.println(sql2);
         RowsMap newmsgmap = timnewmsgSQL.runSqlQuery().toRowsMap("timdialogid");
         for (Row drow : dialogrows) {
             Rows newmsgrows = newmsgmap.get(drow.getString("timdialogid"));
@@ -110,7 +105,6 @@ public class supplyanddemand extends Controller {
         RowsMap map = dialogrows.toRowsMap("ownerid");
 
         for (Row row : rows) {
-//            System.err.println("row:"+row.getString("tsupplyanddemandid"));
             row.put("imdialogs", map.get(row.getString("tsupplyanddemandid")));
             //¸½¼þÐÅÏ¢
             row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/activity/SQL/访客入场信息查询.sql

@@ -1,2 +1,2 @@
 select t1.tactivitysignupid,t1.createdate,t1.flocation,t1.fecid from tactivityvisitmsg t1
-where t1.siteid=$siteid$ and t1.tactivitysignupid in $t1.tactivitysignupid$
+where t1.siteid=$siteid$ and t1.tactivitysignupid in $tactivitysignupid$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/activity/SQL/访客登记信息查询.sql

@@ -1,2 +1,2 @@
-select t1.createdate,t1.faddress,t1.fchannel,t1.fcompname,t1.fidcard,t1.findustry,t1.fname,t1.fphonenumber,t1.frole,t1.tactivitysignupid from tactivitysignup t1
+select t1.createdate,t1.faddress,t1.fchannel,t1.fcompname,t1.fidcard,t1.findustry,t1.fname,t1.fphonenumber,t1.frole,t1.tactivitysignupid,t1.fquestionnaire from tactivitysignup t1
 where $where$ and t1.siteid=$siteid$ and t1.tactivityid=$tactivityid$

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

@@ -94,7 +94,7 @@ public class live extends Controller {
                     dbConnect.runSqlUpdate("update tlive set channelpasswd='" + channelpasswd + "' where tliveid='" + tliveid + "'");
                 }
             }
-        } catch ( Exception e) {
+        }catch (Exception e){
             e.printStackTrace();
         }
         SQLFactory sqlFactory = new SQLFactory(this, "Ö±²¥ÏêÇé²éѯ");

+ 1 - 0
src/dsb/com/cnd3b/restcontroller/publicmethod/live/SQL/当前线上观众人数查询.sql

@@ -8,6 +8,7 @@ select channelid,
        count as fcustcount,
        t.channelcoverimageurl,
        t4.saleprodclass,
+       t4.faddress,
        fliveshowurl
 from (
          select ROW_NUMBER() over(partition by t1.channelid order by t1.time desc)as num,t1.channelid,

+ 0 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/live/live.java

@@ -107,7 +107,6 @@ public class live extends Controller {
         SQLFactory sqlFactory = new SQLFactory(this, "门户直播列表", pageSize, pageNumber, "t1.createdate");
         sqlFactory.addParameter("siteid", siteid);
         sqlFactory.addParameter("livestatus", "%" + livestatus + "%");
-        System.err.println(sqlFactory.getSQL());
         Rows agentRows = dbConnect.runSqlQuery(sqlFactory.getSQL());
         for (Row row : agentRows) {
             //观看次数(次)