Просмотр исходного кода

账号列表新增启用状态字段。

沈静伟 4 лет назад
Родитель
Сommit
f2871da421

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

@@ -30,4 +30,4 @@ from tenterprise_users t1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '¾­ÏúÉÌ' and t1.tagentsid = t6.tagentsid) or
                                                              (t1.fusertype = 'ÆóÒµ' and t1.tenterprise_userid = t6.tenterprise_userid)) and
                                   t6.fbegdate <= GETDATE() and t6.fenddate >= GETDATE()
-where t1.fphonenumber =$fphonenumber$ and t2.floginmode in (1, 3)
+where t1.fphonenumber =$fphonenumber$ and t2.floginmode in (1, 3) and t1.fisused=1

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

@@ -31,4 +31,4 @@ from tenterprise_users t1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '¾­ÏúÉÌ' and t1.tagentsid = t6.tagentsid) or
                                                              (t1.fusertype = 'ÆóÒµ' and t1.tenterprise_userid = t6.tenterprise_userid)) and
                                   t6.fbegdate <= GETDATE() and t6.fenddate >= GETDATE()
-where t1.accesstoken=$accesstoken$
+where t1.accesstoken=$accesstoken$ and t1.fisused=1

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

@@ -352,7 +352,7 @@ public class WebClientRest {
         int isnewregister = 0;
         if (resultcode == 0 || Arrays.asList(nocheckphonenumber).contains(phonenumber)) {
             //登陆时,如果验证码验证成功,但是手机号未注册过,则自动进行注册!
-            if (connect.runSqlQuery("select * from tenterprise_users where fphonenumber='" + phonenumber + "'").isEmpty()) {
+            if (connect.runSqlQuery("select * from tenterprise_users where fisused=1 and fphonenumber='" + phonenumber + "'").isEmpty()) {
                 Users users = new Users(requestcontent);
                 users.register_usersByLogin(phonenumber);
                 isnewregister = 1;

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/usercenter/teammsg/SQL/下级账号查询.sql

@@ -1,4 +1,4 @@
 select t1.fparentid, t2.tenterprise_userid, t2.fname, t2.fphonenumber, t2.frole
 from tenterprise_userdetail t1
          inner join tenterprise_users t2 on t1.siteid = t2.siteid and t1.fsubid = t2.tenterprise_userid
-where t1.siteid =$siteid$ and t1.fparentid in $fparentid$
+where t1.siteid =$siteid$ and t1.fparentid in $fparentid$ and t1.fisused=1

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

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

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

@@ -132,4 +132,21 @@ public class teammsg extends Controller {
         return getSucReturnObject().toString();
     }
 
+
+    /**
+     * 团队成员启用停用
+     *
+     * @return
+     */
+    public String updateusedstate() throws D3bException, P2Exception {
+        long tenterprise_userid = content.getLongValue("tenterprise_userid");//账号ID
+        boolean fisused = content.getBooleanValue("fisused");//是否启用
+        String status = dbConnect.runSqlUpdate("update tenterprise_users set fisused='" + (fisused ? 1 : 0) + "' where siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and tenterprise_userid='" + tenterprise_userid + "'");
+        if ("true".equals(status)) {
+            return getSucReturnObject().toString();
+        } else {
+            return getErrReturnObject().toString();
+        }
+    }
+
 }

+ 1 - 0
src/p2apps/p2/application/tagents/tagents.java

@@ -29,6 +29,7 @@ public class tagents extends PaoCust {
             tenterprise_user.setValue("fbirthdate", getString("fbirthdate"), 11L);
             tenterprise_user.setValue("femail", getString("femail"), 11L);
             tenterprise_user.setValue("fwechatno", getString("fwechatno"), 11L);
+            tenterprise_user.setValue("fisused", true, 11L);
         }
     }
 }

+ 1 - 0
src/p2apps/p2/application/tenterprise_users/tenterprise_users.java

@@ -26,6 +26,7 @@ public class tenterprise_users extends PaoCust {
         } else if (getOwner() instanceof tenterprise) {
             setValue("fusertype", "ÆóÒµ", 11L);
         }
+        setValue("fisused", true, 11L);
     }
 
     @Override