From 789acd698b3aa20b53505dee6aa36b613acfaa00 Mon Sep 17 00:00:00 2001 From: lxyer <237809796@qq.com> Date: Mon, 26 Nov 2018 14:14:35 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81pom=E5=8A=A0=E5=85=A5=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89maven=E8=B7=AF=E5=BE=84=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E9=83=A8=E5=88=86=E7=94=A8=E6=88=B7=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=90=8Emaven=E8=B7=AF=E5=BE=84=E4=B8=8D=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E9=97=AE=E9=A2=98=202=E3=80=81pom=E4=BF=AE=E6=94=B9=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=89=93=E5=8C=85=E4=B8=BA1.8=203=E3=80=81=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E8=B6=85=E8=BF=87jdk1.8=E7=89=88=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 5 +++-- src/com/lxyer/bbs/base/TaskQueue.java | 3 ++- src/com/lxyer/bbs/base/user/UserRecord.java | 13 +------------ 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 11147f7..c74436d 100644 --- a/pom.xml +++ b/pom.xml @@ -8,13 +8,14 @@ redbbs 1.0-SNAPSHOT + src org.apache.maven.plugins maven-compiler-plugin - 11 - 11 + 1.8 + 1.8 diff --git a/src/com/lxyer/bbs/base/TaskQueue.java b/src/com/lxyer/bbs/base/TaskQueue.java index cb891db..fa3e8e0 100644 --- a/src/com/lxyer/bbs/base/TaskQueue.java +++ b/src/com/lxyer/bbs/base/TaskQueue.java @@ -24,6 +24,7 @@ import org.redkale.source.Flipper; import org.redkale.util.AnyValue; import org.redkale.util.Comment; import org.redkale.util.Sheet; +import org.redkale.util.Utility; import javax.annotation.Resource; import java.util.*; @@ -138,7 +139,7 @@ public class TaskQueue extends BaseService implements Runnable " sort total desc\n" + " limit 10\n" + " return {name: uri,total:total}", - Map.of("time", cal.getTimeInMillis()), + Utility.ofMap("time", cal.getTimeInMillis()), Count.class); Function, List> deal = (counts) -> { diff --git a/src/com/lxyer/bbs/base/user/UserRecord.java b/src/com/lxyer/bbs/base/user/UserRecord.java index 9189eba..95c0dc2 100644 --- a/src/com/lxyer/bbs/base/user/UserRecord.java +++ b/src/com/lxyer/bbs/base/user/UserRecord.java @@ -225,17 +225,6 @@ public class UserRecord implements java.io.Serializable { } public static String md5IfNeed(String password){ - if (password == null || password.isEmpty()) return ""; - if (password.length() == 32) return password; - MessageDigest md5 = null; - try { - md5 = MessageDigest.getInstance("MD5"); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } - - byte[] bytes = password.trim().getBytes(); - bytes = md5.digest(bytes); - return new String(Utility.binToHex(bytes)); + return Utility.md5Hex(password); } }