ソースを参照

Merge remote-tracking branch 'origin/develop' into develop

沈静伟 4 年 前
コミット
ba2acf9ece

+ 2 - 0
src/dsb/com/cnd3b/restcontroller/customer/tagents/SQL/经销商账号列表查询.sql

@@ -0,0 +1,2 @@
+select tenterprise_userid,t1.fname,t1.frole,t1.fphonenumber,t1.fisused,t1.fisadministrator from tenterprise_users t1
+where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and t1.fisadministrator=0 and t1.fusertype='¾­ÏúÉÌ'

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

@@ -319,4 +319,25 @@ public class tagents extends Controller {
         return getSucReturnObject().setData(rows).toString();
     }
 
+
+
+    /**
+     * 查询合作商户子账号列表
+     * @return
+     */
+    public String query_CooperationAgentUsers() {
+        String tagentsid = content.getString("tagentsid");
+        SQLFactory sqlFactory = new SQLFactory(this, "经销商账号列表查询");
+        sqlFactory.addParameter("siteid", siteid);
+        sqlFactory.addParameter("tagentsid", tagentsid);
+        Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
+
+        RowsMap attinfosMap = getAttachmentUrl("tenterprise_users", rows.toArrayList("tenterprise_userid"), "headportrait");
+        for (Row row : rows) {
+            String tenterprise_userid = row.getString("tenterprise_userid");
+            row.put("attinfos", attinfosMap.get(tenterprise_userid));
+        }
+        return getSucReturnObject().setData(rows).saveToDataPool().toString();
+    }
+
 }

+ 0 - 30
src/dsb/com/cnd3b/restcontroller/customer/usercenter/teammsg/teammsg.java

@@ -54,37 +54,7 @@ public class teammsg extends Controller {
         return getSucReturnObject().setData(rows).saveToDataPool().toString();
     }
 
-    /**
-     * 查询合作商户子账号列表
-     * @return
-     */
-    public String query_subUserList() {
-        String tagentsid = content.getString("tagentsid");
-        SQLFactory sqlFactory = new SQLFactory(this, "经销商账号列表查询");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("tagentsid", tagentsid);
-        Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
 
-        SQLFactory subusersql = new SQLFactory(this, "下级账号查询");
-        subusersql.addParameter("siteid", siteid);
-        subusersql.addParameter_in("fparentid", rows.toArrayList("tenterprise_userid"));
-
-        RowsMap map = dbConnect.runSqlQuery(subusersql.getSQL()).toRowsMap("fparentid");
-
-        RowsMap attinfosMap = getAttachmentUrl("tenterprise_users", rows.toArrayList("tenterprise_userid"), "headportrait");
-        for (Row row : rows) {
-            String tenterprise_userid = row.getString("tenterprise_userid");
-            Rows subuserrows = map.get(tenterprise_userid);
-            String[] subusers = subuserrows.toArray("tenterprise_userid");
-            row.put("subusers", subusers);
-            for (Row subuserrow : subuserrows) {
-                subuserrow.put("attinfos", attinfosMap.get(subuserrow.getString("tenterprise_userid")));
-            }
-            row.put("subusermsgs", subuserrows);
-            row.put("attinfos", attinfosMap.get(tenterprise_userid));
-        }
-        return getSucReturnObject().setData(rows).saveToDataPool().toString();
-    }
 
     /**
      * 经销商账号信息修改