|
@@ -17,7 +17,6 @@ import cn.com.qmth.examcloud.app.service.PropertyService;
|
|
import cn.com.qmth.examcloud.app.service.RedisService;
|
|
import cn.com.qmth.examcloud.app.service.RedisService;
|
|
import cn.com.qmth.examcloud.app.service.UserAuthService;
|
|
import cn.com.qmth.examcloud.app.service.UserAuthService;
|
|
import okhttp3.*;
|
|
import okhttp3.*;
|
|
-
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -119,7 +118,7 @@ public class UserAuthServiceImpl implements UserAuthService {
|
|
.build();
|
|
.build();
|
|
return HttpUtils.doPut(requestUrl, formBody, key, token);
|
|
return HttpUtils.doPut(requestUrl, formBody, key, token);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Result resetStudentPassword(String key, String token, String newPassword) throws Exception {
|
|
public Result resetStudentPassword(String key, String token, String newPassword) throws Exception {
|
|
//封装请求参数
|
|
//封装请求参数
|
|
@@ -139,22 +138,22 @@ public class UserAuthServiceImpl implements UserAuthService {
|
|
.build();
|
|
.build();
|
|
return HttpUtils.doPost(requestUrl, formBody, key, token);
|
|
return HttpUtils.doPost(requestUrl, formBody, key, token);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
- public Result code4Student(String phone, Boolean bound) throws Exception {
|
|
|
|
- //封装请求参数
|
|
|
|
- final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode4Student", propertyService.getUserAuthUrl());
|
|
|
|
- RequestBody formBody = new FormBody.Builder()
|
|
|
|
- .add("phone", phone)
|
|
|
|
- .add("bound", bound.toString())
|
|
|
|
- .build();
|
|
|
|
- Request request = new Request.Builder()
|
|
|
|
- .url(requestUrl)
|
|
|
|
- .post(formBody)
|
|
|
|
- .build();
|
|
|
|
- //执行请求
|
|
|
|
- return HttpUtils.call(request);
|
|
|
|
- }
|
|
|
|
|
|
+ public Result code4Student(String phone, Boolean bound) throws Exception {
|
|
|
|
+ //封装请求参数
|
|
|
|
+ final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode4Student", propertyService.getUserAuthUrl());
|
|
|
|
+ RequestBody formBody = new FormBody.Builder()
|
|
|
|
+ .add("phone", phone)
|
|
|
|
+ .add("bound", bound.toString())
|
|
|
|
+ .build();
|
|
|
|
+ Request request = new Request.Builder()
|
|
|
|
+ .url(requestUrl)
|
|
|
|
+ .post(formBody)
|
|
|
|
+ .build();
|
|
|
|
+ //执行请求
|
|
|
|
+ return HttpUtils.call(request);
|
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Result userBindingPhone(String key, String token, String phone, String code) throws Exception {
|
|
public Result userBindingPhone(String key, String token, String phone, String code) throws Exception {
|