Sfoglia il codice sorgente

服务热线、web端地址更新
活动状态根据时间自动判断更新
管理端直播列表新增品牌名和商户名称
当前在线人数错误修复

沈静伟 4 anni fa
parent
commit
8b2274f67b

+ 2 - 2
src/dsb/com/cnd3b/common/restful/WebClientRest.java

@@ -407,8 +407,8 @@ public class WebClientRest {
             JSONObject object = new JSONObject();
             object.put("code", 1);
             object.put("msg", "成功");
-            object.put("webclienturl", "13732579910");
-            object.put("servicehotline", "https://www.buwanjia.com/customer/index.html");
+            object.put("webclienturl", "https://www.buwanjia.com/customer/index.html");
+            object.put("servicehotline", "13732579910");
             object.put("account_list", rows.toJsonArray());
 
             //登录成功,将验证码失效掉;

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

@@ -60,7 +60,7 @@ public class activity extends Controller {
         String ftitle = content.getString("ftitle", "tactivity.ftitle", "活动名称");
         String fnotes = content.getString("fnotes", "tactivity.fnotes", "活动介绍");
         String fshow_url = content.getString("fshow_url", "tactivity.fshow_url", "活动宣传页");
-        String fstatus = content.getString("fstatus");
+        // String fstatus = content.getString("fstatus");
         Date fbegdate = content.getDate("fbegdate");//开始时间
         Date fenddate = content.getDate("fenddate");//结束时间
 
@@ -74,6 +74,13 @@ public class activity extends Controller {
         } else {
             tactivity = tactivitySet.getPao(0);
         }
+        String fstatus = "活动中";
+        if (sysdate.after(fenddate)) {
+            fstatus = "已结束";
+        }
+        if (sysdate.before(fbegdate)) {
+            fstatus = "未开始";
+        }
         tactivity.setValue("fstatus", fstatus, 11L);
         tactivity.setValue("ftitle", ftitle, 11L);
         tactivity.setValue("fnotes", fnotes, 11L);

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

@@ -1,7 +1,7 @@
 select t1.tliveid, t1.siteid, t1.createby, t1.changeby, t1.createdate, t1.changedate,
        t1.tactivityid, t1.tliveapplyid, t1.tagentsid, t1.fliveurl_web,t1.fliveurl_client, t1.fliveshowurl,
        t1.categoryid,t1.categoryname, t1.channelname, t1.channelpasswd, t1.channelid,t1.fassistanturl,t1.fisneedauth,
-       t1.secretkey,t1.livestatus,t1.channelcoverimageurl,t3.ftitle from tlive t1
+       t1.secretkey,t1.livestatus,t1.channelcoverimageurl,t3.ftitle,t2.fbrand,t2.fagentname from tlive t1
 inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
 left join tactivity t3 on t1.siteid=t3.siteid and t1.tactivityid=t3.tactivityid
 where t1.siteid=$siteid$ and $where$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/live/SQL/直播详情查询.sql

@@ -1,7 +1,7 @@
 select t1.tliveid, t1.siteid, t1.createby, t1.changeby, t1.createdate, t1.changedate,
        t1.tactivityid, t1.tliveapplyid, t1.tagentsid, t1.fliveurl_web,t1.fliveurl_client, t1.fliveshowurl,
        t1.categoryid,t1.categoryname, t1.channelname, t1.channelpasswd, t1.channelid,t1.fassistanturl,t1.fisneedauth,
-       t1.secretkey,t1.livestatus,t1.channelcoverimageurl,t3.ftitle from tlive t1
+       t1.secretkey,t1.livestatus,t1.channelcoverimageurl,t3.ftitle,t2.fbrand,t2.fagentname from tlive t1
 inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
 left join tactivity t3 on t1.siteid=t3.siteid and t1.tactivityid=t3.tactivityid
 where t1.siteid=$siteid$ and t1.tliveid=$tliveid$

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

@@ -48,7 +48,7 @@ public class live extends Controller {
         //正在直播数
         resultObject.put("flivecount", liverows.size());
         //当前在线观众人数
-        resultObject.put("fcustcount", liverows.isEmpty() ? 0 : liverows.sum("fcount"));
+        resultObject.put("fcustcount", liverows.isEmpty() ? 0 : liverows.sum("fcustcount"));
         //直播列表
         resultObject.put("tlivelist", liverows);
         //商户观众总数排行

+ 0 - 2
src/dsb/com/cnd3b/restcontroller/system/system/docManage.java

@@ -697,12 +697,10 @@ public class docManage extends Controller {
         } else if (Utility.isNull(siteid)) {
             resultObject.put("code", 0);
             resultObject.put("msg", "²ÎÊýsiteid´íÎó");
-
         }
         return resultObject;
     }
 
-
     /**
      * ´´½¨ÏÂÔØÈÕÖ¾
      *

+ 17 - 1
src/dsb/com/cnd3b/service/DataStatusChange.java

@@ -4,13 +4,16 @@ import com.cnd3b.common.BaseClass;
 import com.cnd3b.common.data.db.DBConnect;
 import com.cnd3b.common.data.db.SQLiteJDBC;
 
+import java.util.ArrayList;
+
 public class DataStatusChange extends BaseClass implements Runnable {
 
     @Override
     public void run() {
         try {
-            if (new SQLiteJDBC().checkServicesUsed("DataStatusChange",true)) {
+            if (new SQLiteJDBC().checkServicesUsed("DataStatusChange", true)) {
                 supplyanddemandstatus();
+                activitystatus();
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -29,4 +32,17 @@ public class DataStatusChange extends BaseClass implements Runnable {
         }
     }
 
+
+    public void activitystatus() {
+        try {
+            DBConnect dbConnect = new DBConnect();
+            ArrayList<String> list = new ArrayList<>();
+            list.add("update tactivity set fstatus='ÒѽáÊø' where convert(varchar(10),fenddate,120)<convert(varchar(10),getdate())");
+            list.add("update tactivity set fstatus='δ¿ªÊ¼' where convert(varchar(10),fbegdate,120)>convert(varchar(10),getdate())");
+            list.add("update tactivity set fstatus='»î¶¯ÖÐ' where convert(varchar(10),fenddate,120)>=convert(varchar(10),getdate())) and convert(varchar(10),fbegdate,120)<=convert(varchar(10),getdate()");
+            dbConnect.runSqlUpdate(list);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
 }