فهرست منبع

商户信息插入时,商户下每个账号都可查看

沈静伟 4 سال پیش
والد
کامیت
d9508008b9
2فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 5 0
      src/dsb/com/cnd3b/common/Controller.java
  2. 3 1
      src/dsb/com/cnd3b/common/data/SQL/系统消息插入.sql

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

@@ -327,6 +327,11 @@ public class Controller extends BaseClass {
         return rows.isEmpty() ? null : rows.get(0);
     }
 
+    public Rows getAgentUsers(long tagentsid) {
+        Rows rows = dbConnect.runSqlQuery("select  * from tenterprise_users where siteid='" + siteid + "' and tagentsid=" + tagentsid);
+        return rows;
+    }
+
     public Row getAgent(long tagentsid) {
         Rows rows = dbConnect.runSqlQuery("select  * from tagents where siteid='" + siteid + "' and tagentsid=" + tagentsid);
         return rows.isEmpty() ? null : rows.get(0);

+ 3 - 1
src/dsb/com/cnd3b/common/data/SQL/系统消息插入.sql

@@ -5,4 +5,6 @@ insert into tmessage
 select @tmessageid+ROW_NUMBER()over(order by fphonenumber), siteid, getDate(), 0, $fmessage$, $ftype$, 0, null, tenterprise_userid,$ftitle$,
 $objectid$,$objectname$
 from tenterprise_users
-where fphonenumber is not null and siteid=$siteid$ and tenterprise_userid = $tenterprise_userid$
+where fphonenumber is not null and siteid=$siteid$ and
+(($ftype$!='ÉÌ»§' and tenterprise_userid = $tenterprise_userid$)or
+ ($ftype$='ÉÌ»§' and exists(select *from tenterprise_users t1 where t1.tenterprise_userid=$tenterprise_userid$ and tenterprise_users.tagentsid=t1.tagentsid) ))