|
@@ -11,6 +11,7 @@ import com.flow.model.*;
|
|
import com.flow.service.AuthService;
|
|
import com.flow.service.AuthService;
|
|
import com.wf.captcha.ArithmeticCaptcha;
|
|
import com.wf.captcha.ArithmeticCaptcha;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
@@ -103,7 +104,8 @@ public class AuthServiceImpl implements AuthService {
|
|
try {
|
|
try {
|
|
decryptedData = decrypt(saltData);
|
|
decryptedData = decrypt(saltData);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- throw new BaseException("盐值解析异常,请联系管理员" + e.getMessage());
|
|
|
|
|
|
+ log.error("盐值解析异常", e);
|
|
|
|
+ throw new BaseException("盐值解析异常,请联系管理员");
|
|
}
|
|
}
|
|
log.info("解密后的数据: " + decryptedData);
|
|
log.info("解密后的数据: " + decryptedData);
|
|
|
|
|
|
@@ -112,7 +114,12 @@ public class AuthServiceImpl implements AuthService {
|
|
} else {
|
|
} else {
|
|
JSONObject jsonObject = new JSONObject(decryptedData);
|
|
JSONObject jsonObject = new JSONObject(decryptedData);
|
|
|
|
|
|
- String user = jsonObject.getString("user");
|
|
|
|
|
|
+ String user = null;
|
|
|
|
+ try {
|
|
|
|
+ user = jsonObject.getString("user");
|
|
|
|
+ } catch (JSONException e) {
|
|
|
|
+ throw new BaseException("用户信息异常,请联系管理员");
|
|
|
|
+ }
|
|
long time = jsonObject.getLong("time");
|
|
long time = jsonObject.getLong("time");
|
|
String form = jsonObject.getString("form");
|
|
String form = jsonObject.getString("form");
|
|
|
|
|