sjw il y a 4 ans
Parent
commit
c31540ed8d

+ 0 - 9
src/dsb/com/cnd3b/common/restful/SQL/企业账号权限组查询.sql

@@ -1,9 +0,0 @@
-select distinct t1.siteid, t1.tenterprise_userid
-from tenterprise_users t1
-         left join tauthgroup t2 on t1.siteid = t2.siteid and t1.tauthgroupid = t2.tauthgroupid
-         left join tauthgroup_apps t3
-                    on t2.siteid = t3.siteid and t2.tauthgroupid = t3.tauthgroupid
-         left join system_apps t4 on t3.system_appsid = t4.system_appsid
-where ((t1.fisadministrator = 1 and t2.fisused = 1 and t4.fisused=1)or t1.fissysadministrator=1)
-  and t1.fusertype = 'ÆóÒµ'
-  and t1.fphonenumber =$fphonenumber$

+ 4 - 9
src/dsb/com/cnd3b/common/restful/SQL/手机账号列表查询.sql

@@ -11,26 +11,21 @@ select t1.tenterprise_userid
        t1.fname,
        t1.fname,
        t1.fisadministrator,
        t1.fisadministrator,
        t1.fissysadministrator,
        t1.fissysadministrator,
-       case
-           when t1.fusertype = '经销商' and t3.tagentsid IS not null and t3.fappmodel is not null then t3.fappmodel
-           else t5.fappmodel end                                                     as fappmodel,
+       t5.fappmodel,
        case
        case
            when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
            when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
                                            (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
                                            (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
            else 0 end                                                                as fisneedpay,
            else 0 end                                                                as fisneedpay,
-       case
-           when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
-                                           (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then '当前账号未激活'
-           else '' end                                                               as fioserrmsg,
        case
        case
            when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
            when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
            when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
            when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
            else 0 end                                                                as fpayamount,
            else 0 end                                                                as fpayamount,
        t5.fagentoldamount,
        t5.fagentoldamount,
        t2.floginmode,
        t2.floginmode,
-       t2.tenterpriseid
+       t2.tenterpriseid,
+       t3.ftype as fagenttype
 from tenterprise_users t1
 from tenterprise_users t1
-         inner join tenterprise t2 on t1.siteid = t2.siteid and (fenddate is null or fenddate > getdate())
+         inner join tenterprise t2 on t1.siteid = t2.siteid
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '经销商' and t1.tagentsid = t6.tagentsid) or
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '经销商' and t1.tagentsid = t6.tagentsid) or

+ 4 - 9
src/dsb/com/cnd3b/common/restful/SQL/持久化账号列表查询.sql

@@ -11,17 +11,11 @@ select t1.tenterprise_userid
        t1.fname,
        t1.fname,
        t1.fisadministrator,
        t1.fisadministrator,
        t1.fissysadministrator,
        t1.fissysadministrator,
-       case
-           when t1.fusertype = '经销商' and t3.tagentsid IS not null and t3.fappmodel is not null then t3.fappmodel
-           else t5.fappmodel end                                                    as fappmodel,
+       t5.fappmodel,
        case
        case
            when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
            when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
                                            (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
                                            (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
            else 0 end                                                               as fisneedpay,
            else 0 end                                                               as fisneedpay,
-       case
-           when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
-                                           (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then '当前账号未激活'
-           else '' end                                                              as fioserrmsg,
        case
        case
            when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
            when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
            when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
            when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
@@ -29,9 +23,10 @@ select t1.tenterprise_userid
        t5.fagentoldamount,
        t5.fagentoldamount,
        t2.floginmode,
        t2.floginmode,
        t1.accesstoken                                                               as token,
        t1.accesstoken                                                               as token,
-       t2.tenterpriseid
+       t2.tenterpriseid,
+       t3.ftype as fagenttype
 from tenterprise_users t1
 from tenterprise_users t1
-         inner join tenterprise t2 on t1.siteid = t2.siteid and (fenddate is null or fenddate > getdate())
+         inner join tenterprise t2 on t1.siteid = t2.siteid
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '经销商' and t1.tagentsid = t6.tagentsid) or
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '经销商' and t1.tagentsid = t6.tagentsid) or

+ 4 - 9
src/dsb/com/cnd3b/common/restful/SQL/账号列表查询.sql

@@ -11,26 +11,21 @@ select t1.tenterprise_userid
        t1.fname,
        t1.fname,
        t1.fisadministrator,
        t1.fisadministrator,
        t1.fissysadministrator,
        t1.fissysadministrator,
-       case
-           when t1.fusertype = '经销商' and t3.tagentsid IS not null and t3.fappmodel is not null then t3.fappmodel
-           else t5.fappmodel end                                                     as fappmodel,
+       t5.fappmodel,
        case
        case
            when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
            when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
                                            (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
                                            (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
            else 0 end                                                                as fisneedpay,
            else 0 end                                                                as fisneedpay,
-       case
-           when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
-                                           (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then '当前账号未激活'
-           else '' end                                                               as fioserrmsg,
        case
        case
            when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
            when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
            when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
            when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
            else 0 end                                                                as fpayamount,
            else 0 end                                                                as fpayamount,
        t5.fagentoldamount,
        t5.fagentoldamount,
        t2.floginmode,
        t2.floginmode,
-       t2.tenterpriseid
+       t2.tenterpriseid,
+       t3.ftype as fagenttype
 from tenterprise_users t1
 from tenterprise_users t1
-         inner join tenterprise t2 on t1.siteid = t2.siteid and (fenddate is null or fenddate > getdate())
+         inner join tenterprise t2 on t1.siteid = t2.siteid
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '经销商' and t1.tagentsid = t6.tagentsid) or
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '经销商' and t1.tagentsid = t6.tagentsid) or

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

@@ -42,7 +42,7 @@ import java.util.Random;
 @Path("webclientrest")
 @Path("webclientrest")
 public class WebClientRest {
 public class WebClientRest {
 
 
-    private static String[] nocheckphonenumber = {"17357363127", "13805731234"};
+    private static String[] nocheckphonenumber = {""};
 
 
     @POST
     @POST
     public String method(@Context HttpServletRequest request, String RequestContent) {
     public String method(@Context HttpServletRequest request, String RequestContent) {
@@ -276,16 +276,7 @@ public class WebClientRest {
             object.put("msg", "当前手机号未注册!");
             object.put("msg", "当前手机号未注册!");
             return object.toString();
             return object.toString();
         }
         }
-        if ("enterpriseweb".equalsIgnoreCase(client)) {
-            SQLFactory sqlFactory = new SQLFactory(this, "企业账号权限组查询");
-            sqlFactory.addParameter("fphonenumber", phonenumber);
-            if (dbConnect.runSqlQuery(sqlFactory.getSQL()).isEmpty()) {
-                JSONObject object = new JSONObject();
-                object.put("code", 0);
-                object.put("msg", "当前手机号没有有效的管理员账号!");
-                return object.toString();
-            }
-        }
+
         String password = createPassWord();
         String password = createPassWord();
         parameter.phonenumber_password.put(phonenumber, password);
         parameter.phonenumber_password.put(phonenumber, password);
         Calendar calendar = Calendar.getInstance();
         Calendar calendar = Calendar.getInstance();