Browse Source

商户列表查询恢复重复和已开通直播的商户

吴志根 3 years ago
parent
commit
ee55db690f

+ 6 - 3
src/dsb/com/cnd3b/restcontroller/enterprise/tagents/SQL/认证商户列表查询.sql

@@ -10,8 +10,11 @@ select t1.tagentsid,
        count(t2.tenterprise_userid) as fteamsize,
        max(t3.flastrequestdate)as flastrequestdate,
        isnull(t1.saleprodclass,'[]')as saleprodclass
-from (  select * from tagents A where not exists(select 1 from tagents where fbrand=A.fbrand and faddress=A.faddress and fagentname=A.fagentname and tagentsid<A.tagentsid)) t1
+from tagents t1
 inner join tenterprise_users t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
 left join tuserrequestlog t3 on t1.siteid = t3.siteid and t2.tenterprise_userid = t3.tenterprise_userid
-where t1.siteid =$siteid$ and $where$ and t1.ftype!='¸öÈË' and t1.tagentsid not in $tagentsid$
-group by t1.tagentsid,t1.siteid,t1.createdate,t1.fagentname,t1.faddress,t1.fcontact,t1.fphonenumber,t1.fbrand,t1.fisused,t1.saleprodclass
+where t1.siteid =$siteid$ and $where$ and t1.ftype!='¸öÈË'
+group by t1.tagentsid,t1.siteid,t1.createdate,t1.fagentname,t1.faddress,t1.fcontact,t1.fphonenumber,t1.fbrand,t1.fisused,t1.saleprodclass
+
+--select * from tagents A where not exists(select 1 from tagents where fbrand=A.fbrand and faddress=A.faddress and fagentname=A.fagentname and tagentsid<A.tagentsid)
+-- and t1.tagentsidnot in $tagentsid$

+ 7 - 6
src/dsb/com/cnd3b/restcontroller/enterprise/tagents/tagents.java

@@ -59,6 +59,7 @@ public class tagents extends Controller {
      * @return
      */
     public String query_agentsList() {
+
         /**
          * 过滤条件设置
          */
@@ -88,18 +89,18 @@ public class tagents extends Controller {
                         "and isnull(tactivityid,0)='' and tagentsid=t1.tagentsid) ");
             }
         }
-        Rows tRows = dbConnect.runSqlQuery(" SELECT DISTINCT tagentsid FROM tlive");
-        SQLFactory sqlFactory2 = new SQLFactory(this, "查询重复的商户");
-        Rows tRows2 = dbConnect.runSqlQuery(sqlFactory2.getSQL());
-        tRows.addAll(tRows2);
+//        Rows tRows = dbConnect.runSqlQuery(" SELECT DISTINCT tagentsid FROM tlive");
+//        SQLFactory sqlFactory2 = new SQLFactory(this, "查询重复的商户");
+//        Rows tRows2 = dbConnect.runSqlQuery(sqlFactory2.getSQL());
+//        tRows.addAll(tRows2);
         SQLFactory agentsql = new SQLFactory(this, "认证商户列表查询", pageSize, pageNumber, "t1.tagentsid desc");
         agentsql.addParameter("siteid", siteid);
         agentsql.addParameter_SQL("where", where);
         //排除掉已经创建直播的商户
-        agentsql.addParameter_in("tagentsid",tRows.toArrayList("tagentsid"));
+//        agentsql.addParameter_in("tagentsid",tRows.toArrayList("tagentsid"));
         Rows rows = dbConnect.runSqlQuery(agentsql.getSQL());
 
-        String sql = agentsql.getSQL();
+//        String sql = agentsql.getSQL();
 
         SQLFactory agentchecksql = new SQLFactory(this, "商户认证时间查询");
         agentchecksql.addParameter("siteid", siteid);