|
@@ -7,15 +7,15 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.app.service.impl;
|
|
package cn.com.qmth.examcloud.app.service.impl;
|
|
|
|
|
|
|
|
+import cn.com.qmth.examcloud.app.core.SysProperty;
|
|
import cn.com.qmth.examcloud.app.core.exception.ApiException;
|
|
import cn.com.qmth.examcloud.app.core.exception.ApiException;
|
|
import cn.com.qmth.examcloud.app.core.utils.HttpClientBuilder;
|
|
import cn.com.qmth.examcloud.app.core.utils.HttpClientBuilder;
|
|
import cn.com.qmth.examcloud.app.core.utils.HttpUtils;
|
|
import cn.com.qmth.examcloud.app.core.utils.HttpUtils;
|
|
import cn.com.qmth.examcloud.app.core.utils.JsonMapper;
|
|
import cn.com.qmth.examcloud.app.core.utils.JsonMapper;
|
|
import cn.com.qmth.examcloud.app.core.utils.ThreadUtils;
|
|
import cn.com.qmth.examcloud.app.core.utils.ThreadUtils;
|
|
import cn.com.qmth.examcloud.app.model.*;
|
|
import cn.com.qmth.examcloud.app.model.*;
|
|
-import cn.com.qmth.examcloud.app.core.SysProperty;
|
|
|
|
-import cn.com.qmth.examcloud.app.service.RedisService;
|
|
|
|
import cn.com.qmth.examcloud.app.service.CoreAuthService;
|
|
import cn.com.qmth.examcloud.app.service.CoreAuthService;
|
|
|
|
+import cn.com.qmth.examcloud.app.service.RedisService;
|
|
import okhttp3.*;
|
|
import okhttp3.*;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
@@ -45,13 +45,12 @@ public class CoreAuthServiceImpl implements CoreAuthService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean isDoingExam(Long rootOrgId, String accountType, String account) {
|
|
public boolean isDoingExam(Long rootOrgId, String accountType, String account) {
|
|
- if (rootOrgId == null || StringUtils.isBlank(account)) {
|
|
|
|
- log.warn(String.format("[isDoingExam] rootOrgId=%s, account=%s, accountType=%s", rootOrgId, account, accountType));
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ log.warn(String.format("[check Doing Exam] rootOrgId=%s, account=%s, accountType=%s", rootOrgId, account, accountType));
|
|
|
|
|
|
Map<String, String> params = new HashMap<>();
|
|
Map<String, String> params = new HashMap<>();
|
|
- params.put("rootOrgId", rootOrgId.toString());
|
|
|
|
|
|
+ if (rootOrgId != null) {
|
|
|
|
+ params.put("rootOrgId", rootOrgId.toString());
|
|
|
|
+ }
|
|
|
|
|
|
if (LoginType.STUDENT_CODE.name().equals(accountType)) {
|
|
if (LoginType.STUDENT_CODE.name().equals(accountType)) {
|
|
params.put("studentCode", account);
|
|
params.put("studentCode", account);
|