Ver código fonte

短信登录

huangxingxing 1 ano atrás
pai
commit
5d4a1982bf

+ 8 - 10
src/main/java/com/miniframe/bisiness/system/A00002Service.java

@@ -116,9 +116,13 @@ public class A00002Service extends A00002BaseModel implements ExecProcessFlow {
         userLogin.setLoginCode(XIUtils.getNormalReturnCode());
         userLogin.setLoginMsg(Loginflag.sucess.getDesc());
 
-
-        // 如果存在
-        if (loginWay.equals(LoginWay.MANUAL.getIndex())) { //手动登录
+        if ("0".equals(this.getA_a00002().getType())) {// 如果是短信登录
+            // 验证短信验证码
+            if (!IdentifyingCodeUtil.verification(this.getA_a00002().getPhoneNo(), this.getA_a00002().getAuthCode())) {
+                // 验证码校验失败!
+                throw new BusinessException("EB8000021");
+            }
+        }else if (loginWay.equals(LoginWay.MANUAL.getIndex())) { //手动登录
             if (LoginType.PASSWD.getIndex().equals(loginType)) {// 密码登录
 
                 String password_ = XIDESedeCoderUtils.dec(this.getA_a00002().getPassword(), this.getA_systemhead().getClientToken());//3DES解密
@@ -138,13 +142,7 @@ public class A00002Service extends A00002BaseModel implements ExecProcessFlow {
 //				throw new BusinessException("EB8000021");
 //			}
             }
-        }else  if ("0".equals(this.getA_a00002().getType())) {// 如果是短信登录
-                // 验证短信验证码
-                if (!IdentifyingCodeUtil.verification(this.getA_a00002().getPhoneNo(), this.getA_a00002().getAuthCode())) {
-                    // 验证码校验失败!
-                    throw new BusinessException("EB8000021");
-                }
-            } else { //自动登录,验证clientToken
+        } else { //自动登录,验证clientToken
             boolean isCheckJwtToken=false;
             try {
                 isCheckJwtToken=LoginService.checkJwtTokenForUser(this.getA_systemhead().getUserId(), this.getA_systemhead().getClientToken());

+ 1 - 1
系统设计/通信设计/通讯报文/system(系统服务)/报文体/A00002_A(登录).csv

@@ -1,5 +1,5 @@
 序号,英文名称,中文名称,数据类型,默认值,格式化,非空/引用,最小(长度/值),最大(长度/值),验证规则,标准数据ID,XML样式,TAG标签,映射/子标签,CDATA
-1,loginName,登录名,string,,,,0,256,,,,,,
+1,loginName,登录名,string,,,,0,256,,,,,,
 2,authCode,验证码,string,,,否,1,6,,,,,,
 3,password,密码,string,,,否,1,128,,,,,,
 4,verifyAuthCode,手机或邮箱验证码,string,,,否,1,6,,,,,,