Quellcode durchsuchen

查询合作商户子账号列表返回商户名称和商户品牌

吴志根 vor 3 Jahren
Ursprung
Commit
c27855cb96

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

@@ -1,2 +1,5 @@
-select tenterprise_userid,t1.fname,t1.frole,t1.fphonenumber,t1.fisused,t1.fisadministrator from tenterprise_users t1
+select tenterprise_userid, t1.fname, t1.frole, t1.fphonenumber, t1.fisused, t1.fisadministrator,t2.fagentname,t2.fbrand
+from tenterprise_users t1
+         INNER JOIN tagents as t2
+ON t1.tagentsid = t2.tagentsid
 where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and t1.fisadministrator=0 and t1.fusertype='¾­ÏúÉÌ'

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

@@ -1,2 +1,9 @@
-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=1 and t1.fusertype='经销商' AND frole = '管理员'
+select tenterprise_userid, t1.fname, t1.frole, t1.fphonenumber, t1.fisused, t1.fisadministrator,t2.fagentname,t2.fbrand
+from tenterprise_users t1
+         INNER JOIN tagents as t2
+                    ON t1.tagentsid = t2.tagentsid
+where t1.siteid = $siteid$
+  and t1.tagentsid = $tagentsid$
+  and t1.fisadministrator = 1
+  and t1.fusertype = '经销商'
+  AND frole = '管理员'