From 751d82b980c6292e10c471738aa42f4ee222da75 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Mon, 2 Sep 2019 17:30:02 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E9=92=88=E5=AF=B9pr=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/api/cal/ParameterKit.java | 3 +-- .../api/data/connection/NameReference.java | 4 --- .../com/fanruan/api/err/JSONException.java | 7 +++-- .../java/com/fanruan/api/json/JSONArray.java | 26 ------------------- .../java/com/fanruan/api/json/JSONKit.java | 11 ++++++++ .../java/com/fanruan/api/json/JSONObject.java | 16 ------------ .../com/fanruan/api/security/SecurityKit.java | 10 +++++++ 7 files changed, 27 insertions(+), 50 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/data/connection/NameReference.java delete mode 100644 src/main/java/com/fanruan/api/json/JSONArray.java create mode 100644 src/main/java/com/fanruan/api/json/JSONKit.java delete mode 100644 src/main/java/com/fanruan/api/json/JSONObject.java diff --git a/src/main/java/com/fanruan/api/cal/ParameterKit.java b/src/main/java/com/fanruan/api/cal/ParameterKit.java index 86bff51..102e6a4 100644 --- a/src/main/java/com/fanruan/api/cal/ParameterKit.java +++ b/src/main/java/com/fanruan/api/cal/ParameterKit.java @@ -96,8 +96,7 @@ public class ParameterKit { * @param ps 旧的参数集合 * @return 新参数集合 */ - public static Parameter[] analyzeAndUnionSameParameters(String[] paramTexts, - Parameter[] ps){ + public static ParameterProvider[] analyzeAndUnionSameParameters(String[] paramTexts, Parameter[] ps){ return ParameterHelper.analyzeAndUnionSameParameters(paramTexts, ps); } } diff --git a/src/main/java/com/fanruan/api/data/connection/NameReference.java b/src/main/java/com/fanruan/api/data/connection/NameReference.java deleted file mode 100644 index 86aa41d..0000000 --- a/src/main/java/com/fanruan/api/data/connection/NameReference.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.fanruan.api.data.connection; - -public class NameReference extends com.fr.data.impl.NameDatabaseConnection{ -} diff --git a/src/main/java/com/fanruan/api/err/JSONException.java b/src/main/java/com/fanruan/api/err/JSONException.java index 9de7f2e..393c32e 100644 --- a/src/main/java/com/fanruan/api/err/JSONException.java +++ b/src/main/java/com/fanruan/api/err/JSONException.java @@ -1,8 +1,11 @@ package com.fanruan.api.err; +/* +* 定义json的异常 +* */ public class JSONException extends com.fr.json.JSONException{ - public JSONException(String var1) { - super(var1); + public JSONException(String message) { + super(message); } public JSONException(Throwable var1) { diff --git a/src/main/java/com/fanruan/api/json/JSONArray.java b/src/main/java/com/fanruan/api/json/JSONArray.java deleted file mode 100644 index 3199f27..0000000 --- a/src/main/java/com/fanruan/api/json/JSONArray.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.fanruan.api.json; - -import java.util.*; -import java.lang.*; - -public class JSONArray extends com.fr.json.JSONArray{ - public JSONArray(){ - - } - - public JSONArray(Collection collection){ - super(collection); - } - - public JSONArray(List list) { - super(list); - } - - public JSONArray(Object array) { - super(array); - } - - public JSONArray(String json) { - super(json); - } -} diff --git a/src/main/java/com/fanruan/api/json/JSONKit.java b/src/main/java/com/fanruan/api/json/JSONKit.java new file mode 100644 index 0000000..2514012 --- /dev/null +++ b/src/main/java/com/fanruan/api/json/JSONKit.java @@ -0,0 +1,11 @@ +package com.fanruan.api.json; +import com.fr.json.JSONObject; + +public class JSONKit { + public static JSONObject create() { + return new JSONObject(); + } + public static JSONObject create(String text) { + return new JSONObject(text); + } +} diff --git a/src/main/java/com/fanruan/api/json/JSONObject.java b/src/main/java/com/fanruan/api/json/JSONObject.java deleted file mode 100644 index 31a53ba..0000000 --- a/src/main/java/com/fanruan/api/json/JSONObject.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.fanruan.api.json; -import java.util.*; - -public class JSONObject extends com.fr.json.JSONObject{ - public JSONObject(){ - - } - - public JSONObject(Map map){ - super(map); - } - - public JSONObject(String json){ - super(json); - } -} diff --git a/src/main/java/com/fanruan/api/security/SecurityKit.java b/src/main/java/com/fanruan/api/security/SecurityKit.java index 5a72db1..e6e903c 100644 --- a/src/main/java/com/fanruan/api/security/SecurityKit.java +++ b/src/main/java/com/fanruan/api/security/SecurityKit.java @@ -1,6 +1,7 @@ package com.fanruan.api.security; import com.fr.security.SecurityToolbox; +import com.fr.stable.CodeUtils; /** * @author richie @@ -25,4 +26,13 @@ public class SecurityKit { public static String decrypt(String cipherText) { return SecurityToolbox.decrypt(cipherText); } + /** + * 给字符串解密 + * @param passwordText 待解密的字符串 + * @return 解密后的字符串 + */ + @Deprecated + public static String passwordDecode(String passwordText) { + return CodeUtils.passwordDecode(passwordText); + } }