|
|
@@ -192,6 +192,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Card_Info.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
Unlocking unlocking = new Unlocking();
|
|
|
// 锁用户id
|
|
|
@@ -217,9 +221,8 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -239,6 +242,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Fingerprint_Data.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
Unlocking unlocking = new Unlocking();
|
|
|
// 锁用户id
|
|
|
@@ -260,9 +267,8 @@ public class PasswordIssController {
|
|
|
return unlocking;
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -282,6 +288,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Password.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
String temporaryPassword = data.getString("temporaryPassword");
|
|
|
String passWord = AesUtils.decrypt(temporaryPassword, pr.getLuid());
|
|
|
@@ -304,9 +314,8 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -339,6 +348,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Password.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
String temporaryPassword = data.getString("temporaryPassword");
|
|
|
String passWord2 = AesUtils.decrypt(temporaryPassword, luid);
|
|
|
@@ -356,9 +369,8 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -388,6 +400,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Card_Info.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
UnlockingAdmin unlocking = new UnlockingAdmin();
|
|
|
// 锁用户id
|
|
|
@@ -408,9 +424,9 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -437,6 +453,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Fingerprint_Data.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
UnlockingAdmin unlocking = new UnlockingAdmin();
|
|
|
// 锁用户id
|
|
|
@@ -451,9 +471,9 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -498,10 +518,14 @@ public class PasswordIssController {
|
|
|
String jsonContent = JSONObject.toJSONString(map);
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.DeleteLockUser.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
// System.out.println("jsonObject = " + jsonObject);
|
|
|
// return jsonObject;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
// return null;
|
|
|
}
|
|
|
@@ -568,6 +592,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Password.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
String temporaryPassword = data.getString("temporaryPassword");
|
|
|
String passWord2 = AesUtils.decrypt(temporaryPassword, luid);
|
|
|
@@ -585,9 +613,9 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -613,6 +641,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Card_Info.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
UnlockingCustom unlocking = new UnlockingCustom();
|
|
|
// 锁用户id
|
|
|
@@ -632,9 +664,8 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
public UnlockingCustom addCustomFingerprintDto(CustomKeyFingerprintDto dto) {
|
|
|
@@ -658,6 +689,10 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.Fingerprint_Data.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
UnlockingCustom unlocking = new UnlockingCustom();
|
|
|
// 锁用户id
|
|
|
@@ -672,9 +707,9 @@ public class PasswordIssController {
|
|
|
|
|
|
return unlocking;
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
- return null;
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -688,6 +723,10 @@ public class PasswordIssController {
|
|
|
String jsonContent = JSONObject.toJSONString(map);
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.SetNFC.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
String data = jsonObject.getString("data");
|
|
|
System.out.println("data = " + data);
|
|
|
} catch (Exception e) {
|
|
|
@@ -712,10 +751,14 @@ public class PasswordIssController {
|
|
|
|
|
|
try {
|
|
|
JSONObject jsonObject = queryData(jsonContent, PasswordUrlEnum.ModifyPassword.getUrl());
|
|
|
+ String result = jsonObject.getString("result");
|
|
|
+ if (!"1".equals(result)) {
|
|
|
+ throw new RuntimeException(jsonObject.getString("message"));
|
|
|
+ }
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
System.out.println("data = " + data);
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
|
|
|
}
|