baibx пре 7 месеци
родитељ
комит
4cc03b5b2e

+ 27 - 15
com.sharemao.core.task/src/main/java/com/sharemao/core/task/iot2/ct/CTAPI.java

@@ -110,18 +110,30 @@ public class CTAPI
110 110
 			log.info(url);
111 111
 			token= HttpUtil.get(url);
112 112
 		}
113
-		if(index==55 || index==85)//科锋湖南 文航湖南移动
114
-		{
115
-			String url = "http://ww.kfkj8021.com/index/index/ydToken?appid=C5010731A731J165925&chl_id=64";
116
-			log.info(url);
117
-			String html= HttpUtil.get(url);
118
-			JSONObject resJson = JSONObject.parseObject(html);
119
-			log.info(url+">>>>>>>>"+resJson);
120
-			if(resJson.getIntValue("code")==0)
121
-			{
122
-				token=resJson.getString("info");
123
-			}
124
-		}
113
+        if(index==55 || index==85 || index==96)
114
+        {
115
+            String appid, chl_id;
116
+            if(index==96)//	科锋广东移动(文航CM200220995521)
117
+            {
118
+                appid = "C5010200A9992000958317";
119
+                chl_id = "69";
120
+            }
121
+            else//科锋湖南 文航湖南移动
122
+            {
123
+                appid = "C5010731A731J165925";
124
+                chl_id = "64";
125
+            }
126
+
127
+            String url = "http://ww.kfkj8021.com/index/index/ydToken?appid=" + appid + "&chl_id=" + chl_id;
128
+            log.info(url);
129
+            String html= HttpUtil.get(url);
130
+            JSONObject resJson = JSONObject.parseObject(html);
131
+            log.info(url+">>>>>>>>"+resJson);
132
+            if(resJson.getIntValue("code")==0)
133
+            {
134
+                token=resJson.getString("info");
135
+            }
136
+        }
125 137
 		if (index == 57 || index == 60) {//科锋河南
126 138
 			try {
127 139
 				List<Map<String, Object>> list=DAOHelper.find("mifi", "select app_screct from kas where id=57");
@@ -506,12 +518,12 @@ public class CTAPI
506 518
         return reMap;
507 519
 	}
508 520
 	//中亿实名
509
-	public static Map<String,String> zysm(String iccid,String resettm)
521
+	public static Map<String,String> zysm(String iccid,String appid,String pwd,String resettm)
510 522
 	{
511 523
         String re = "未实名";
512 524
         String token="";
513 525
         String retime= "";
514
-        String url = "http://proxy-api.aiotzy.com/v5/ec/get/token?appid=1985970595451506688&password=wdre1n8bei&transid=1985970595451506688"+DateTimeUtil.longtime()+"80000001";
526
+        String url = "http://proxy-api.aiotzy.com/v5/ec/get/token?appid="+appid+"&password="+pwd+"&transid="+appid+""+DateTimeUtil.longtime()+"80000001";
515 527
         try {
516 528
             String html= HttpUtil.get(url);
517 529
             JSONObject resJson = JSONObject.parseObject(html);
@@ -520,7 +532,7 @@ public class CTAPI
520 532
             if (result != null) {
521 533
                 token = result.getString("token");
522 534
 
523
-                url = "http://proxy-api.aiotzy.com/v5/ec/query/sim-real-name-status?transid=1985970595451506688&token=" + token + "&iccid=" + iccid;
535
+                url = "http://proxy-api.aiotzy.com/v5/ec/query/sim-real-name-status?transid="+appid+"&token=" + token + "&iccid=" + iccid;
524 536
                 String content = HttpUtil.get(url);
525 537
                 log.info(url);
526 538
                 log.info(content);

+ 36 - 4
com.sharemao.core.task/src/main/java/com/sharemao/core/task/iot2/ct/RealName.java

@@ -68,8 +68,24 @@ public class RealName {
68 68
 				}
69 69
 				String resettm=m.get("resettm")==null?"":m.get("resettm").toString();
70 70
                 Map<String,String> result;
71
-                if (kasid==59){
72
-                    result = CTAPI.zysm(iccid,resettm);
71
+                if (kasid == 59 || kasid == 93 || kasid == 94) {
72
+                    String appid="";
73
+                    String pwd="";
74
+                    switch (kasid) {
75
+                        case 59:
76
+                            appid = "1985970595451506688";
77
+                            pwd = "wdre1n8bei";
78
+                            break;
79
+                        case 93:
80
+                            appid = "2032018753943900160";
81
+                            pwd = "it1znsyf2a";
82
+                            break;
83
+                        case 94:
84
+                            appid = "2031988898456014848";
85
+                            pwd = "abp22w4n3l";
86
+                            break;
87
+                    }
88
+                    result = CTAPI.zysm(iccid,appid,pwd,resettm);
73 89
                 }  else if (kasid==56 || kasid==61){
74 90
                     result = CTAPI.kfsdsm(token, iccid, kasid, resettm);
75 91
                 } else {
@@ -83,8 +99,24 @@ public class RealName {
83 99
 				{
84 100
                     Thread.sleep(30000);
85 101
 					token=CTAPI.getToken(kasid);
86
-                    if (kasid==59){
87
-                        result = CTAPI.zysm(iccid,resettm);
102
+                    if (kasid == 59 || kasid == 93 || kasid == 94) {
103
+                    String appid="";
104
+                    String pwd="";
105
+                    switch (kasid) {
106
+                        case 59:
107
+                            appid = "1985970595451506688";
108
+                            pwd = "wdre1n8bei";
109
+                            break;
110
+                        case 93:
111
+                            appid = "2032018753943900160";
112
+                            pwd = "it1znsyf2a";
113
+                            break;
114
+                        case 94:
115
+                            appid = "2031988898456014848";
116
+                            pwd = "abp22w4n3l";
117
+                            break;
118
+                    }
119
+                        result = CTAPI.zysm(iccid,appid,pwd,resettm);
88 120
                     } else if (kasid==56 || kasid==61){
89 121
                         result = CTAPI.kfsdsm(token, iccid, kasid, resettm);
90 122
                     } else {

+ 18 - 2
com.sharemao.core.task/src/main/java/com/sharemao/core/task/iot2/ct/RealNameV2.java

@@ -50,8 +50,24 @@ public class RealNameV2 {
50 50
                     resettm = resettmList.get(0).get("resettm").toString();
51 51
                 }
52 52
                 Map<String,String> result;
53
-                if (kasid==59){
54
-                    result = CTAPI.zysm(iccid,resettm);
53
+                if (kasid == 59 || kasid == 93 || kasid == 94) {
54
+                    String appid="";
55
+                    String pwd="";
56
+                    switch (kasid) {
57
+                        case 59:
58
+                            appid = "1985970595451506688";
59
+                            pwd = "wdre1n8bei";
60
+                            break;
61
+                        case 93:
62
+                            appid = "2032018753943900160";
63
+                            pwd = "it1znsyf2a";
64
+                            break;
65
+                        case 94:
66
+                            appid = "2031988898456014848";
67
+                            pwd = "abp22w4n3l";
68
+                            break;
69
+                    }
70
+                    result = CTAPI.zysm(iccid,appid,pwd,resettm);
55 71
                 } else if(kasid==23 || kasid==25 || kasid==26 || kasid==46 || kasid==47 || kasid==50 || kasid==66 || kasid==67 || kasid==88 || kasid==89 || kasid==90){
56 72
                     result = BW.getRealname(iccid,resettm);
57 73
                 } else if (kasid==56 || kasid==61){

+ 27 - 15
com.sharemao.web.fe/src/main/java/ink/mifi/fe/tools/CTAPI.java

@@ -95,18 +95,30 @@ public class CTAPI
95 95
 			log.info(url);
96 96
 			token= HttpUtil.get(url);
97 97
 		}
98
-		if(index==55 || index==85)//科锋湖南 文航湖南移动
99
-		{
100
-			String url = "http://ww.kfkj8021.com/index/index/ydToken?appid=C5010731A731J165925&chl_id=64";
101
-			log.info(url);
102
-			String html= HttpUtil.get(url);
103
-			JSONObject resJson = JSONObject.parseObject(html);
104
-			log.info(url+">>>>>>>>"+resJson);
105
-			if(resJson.getIntValue("code")==0)
106
-			{
107
-				token=resJson.getString("info");
108
-			}
109
-		}
98
+        if(index==55 || index==85 || index==96)
99
+        {
100
+            String appid, chl_id;
101
+            if(index==96)//	科锋广东移动(文航CM200220995521)
102
+            {
103
+                appid = "C5010200A9992000958317";
104
+                chl_id = "69";
105
+            }
106
+            else//科锋湖南 文航湖南移动
107
+            {
108
+                appid = "C5010731A731J165925";
109
+                chl_id = "64";
110
+            }
111
+
112
+            String url = "http://ww.kfkj8021.com/index/index/ydToken?appid=" + appid + "&chl_id=" + chl_id;
113
+            log.info(url);
114
+            String html= HttpUtil.get(url);
115
+            JSONObject resJson = JSONObject.parseObject(html);
116
+            log.info(url+">>>>>>>>"+resJson);
117
+            if(resJson.getIntValue("code")==0)
118
+            {
119
+                token=resJson.getString("info");
120
+            }
121
+        }
110 122
 		if(index==56 || index==61)//科锋山东
111 123
 		{
112 124
 			String url = "https://api.iesim.cn/v5/ec/get/token?appid=OGARRH1512150825513681&password=9fd3597bff294fcd91ed134d6df5e248&transid=OGARRH1512150825513681"+DateTimeUtil.longtime()+"80000001";
@@ -433,11 +445,11 @@ public class CTAPI
433 445
 		return re;
434 446
 	}
435 447
 	//中亿快速实名
436
-	public static String zyquicksm(String iccid)
448
+	public static String zyquicksm(String iccid,String appid,String pwd)
437 449
 	{
438 450
         String re="";
439 451
         String token="";
440
-        String url = "http://proxy-api.aiotzy.com/v5/ec/get/token?appid=1985970595451506688&password=wdre1n8bei&transid=1985970595451506688"+DateTimeUtil.longtime()+"80000001";
452
+        String url = "http://proxy-api.aiotzy.com/v5/ec/get/token?appid="+appid+"&password="+pwd+"&transid="+appid+""+DateTimeUtil.longtime()+"80000001";
441 453
         log.info(url);
442 454
         String html= HttpUtil.get(url);
443 455
         JSONObject resJson = JSONObject.parseObject(html);
@@ -445,7 +457,7 @@ public class CTAPI
445 457
         JSONObject result=resJson.getJSONObject("result");
446 458
         if (result != null) {
447 459
             token=result.getString("token");
448
-            url="http://proxy-api.aiotzy.com/v5/ec/secure/sim-real-name-reg?transid=1985970595451506688&urlType=6&token="+token+"&iccid="+iccid;
460
+            url="http://proxy-api.aiotzy.com/v5/ec/secure/sim-real-name-reg?transid="+appid+"&urlType=6&token="+token+"&iccid="+iccid;
449 461
             String content=HttpUtil.get(url);
450 462
             log.info(url);
451 463
             log.info(content);

+ 25 - 9
com.sharemao.web.fe/src/main/java/ink/mifi/fe/tools/RealController.java

@@ -114,24 +114,40 @@ public class RealController
114 114
 							String key=resJsonk.getString("app_key");
115 115
 							String screct=resJsonk.getString("app_screct");
116 116
 							String token;
117
-                            if (kid == 59){
118
-                                cturl = CTAPI.zyquicksm(iccid1);
119
-                                log.info("kid="+kid+",iccid1="+iccid1+",key="+key+",cturl="+cturl);
120
-                            } else if (kid == 46 || kid == 25 || kid == 66 || kid == 89 || kid == 90){
117
+                            if (kid == 59 || kid == 93 || kid == 94) {
118
+                                String appid="";
119
+                                String pwd="";
120
+                                switch (kid) {
121
+                                    case 59:
122
+                                        appid = "1985970595451506688";
123
+                                        pwd = "wdre1n8bei";
124
+                                        break;
125
+                                    case 93:
126
+                                        appid = "2032018753943900160";
127
+                                        pwd = "it1znsyf2a";
128
+                                        break;
129
+                                    case 94:
130
+                                        appid = "2031988898456014848";
131
+                                        pwd = "abp22w4n3l";
132
+                                        break;
133
+                                }
134
+                                cturl = CTAPI.zyquicksm(iccid1,appid,pwd);
135
+                                log.info("kid=" + kid + ",iccid1=" + iccid1 + ",key=" + key + ",cturl=" + cturl);
136
+                            } else if (kid == 46 || kid == 25 || kid == 66 || kid == 89 || kid == 90) {
121 137
                                 cturl = CTAPI.bwquicksm(iccid1);
122
-                                log.info("kid="+kid+",iccid1="+iccid1+",key="+key+",cturl="+cturl);
123
-                            }  else if (kid==56 || kid==61){
138
+                                log.info("kid=" + kid + ",iccid1=" + iccid1 + ",key=" + key + ",cturl=" + cturl);
139
+                            } else if (kid == 56 || kid == 61) {
124 140
                                 token = CTAPI.getToken(kid);
125 141
                                 cturl = CTAPI.kfsdquicksm(token, iccid1, kid, key);
126
-                                log.info("kid="+kid+",iccid1="+iccid1+",key="+key+",token="+token+",cturl="+cturl);
127
-                            }  else {
142
+                                log.info("kid=" + kid + ",iccid1=" + iccid1 + ",key=" + key + ",token=" + token + ",cturl=" + cturl);
143
+                            } else {
128 144
                                 if (kid == 57 || kid == 60) {
129 145
                                     token = screct;
130 146
                                 } else {
131 147
                                     token = CTAPI.getToken(kid);
132 148
                                 }
133 149
                                 cturl = CTAPI.quicksm(token, iccid1, kid, key);
134
-                                log.info("kid="+kid+",iccid1="+iccid1+",key="+key+",token="+token+",cturl="+cturl);
150
+                                log.info("kid=" + kid + ",iccid1=" + iccid1 + ",key=" + key + ",token=" + token + ",cturl=" + cturl);
135 151
                             }
136 152
 							if(!Tools.isEmpty(cturl))
137 153
 								context.getRequest().setAttribute("cturl", cturl);

+ 6 - 2
com.shuhaiwifi.web.auth2/src/main/java/com/shuhaiwifi/web/auth2/ctrl/Auth2Controller.java

@@ -433,7 +433,9 @@ public class Auth2Controller
433 433
 					}
434 434
 					else if (isp == 1) 
435 435
 					{
436
-						String token=CmApi.getToken(kid);
436
+                        String appid = resJsonk.getString("appid");
437
+                        String paswd = resJsonk.getString("pwd");
438
+                        String token = CmApi.getToken(appid, paswd);
437 439
 						CmApi.sendSms(token, iccid, mac, terminalMac, phone);
438 440
 					}
439 441
 					else if (isp == 4)
@@ -518,7 +520,9 @@ public class Auth2Controller
518 520
 					} 
519 521
 					else if (isp == 1) 
520 522
 					{
521
-						String token=CmApi.getToken(kid);
523
+                        String appid = resJsonk.getString("appid");
524
+                        String paswd = resJsonk.getString("pwd");
525
+                        String token = CmApi.getToken(appid, paswd);
522 526
 						codeToken=CmApi.terminalAuth(token, iccid, mac, terminalMac, phone, verifyCode);
523 527
 						code=CmApi.tokenCheck(token, iccid, mac, terminalMac, phone, codeToken);
524 528
 					}