From 8831cd261a3efe1392a62dd8c970a60569733f4a Mon Sep 17 00:00:00 2001 From: seagull <24163551@qq.com> Date: Wed, 28 Nov 2018 14:11:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=BF=E6=8D=A2json?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=8F=82=E6=95=B0=E6=97=B6=EF=BC=8C?= =?UTF-8?q?Long\Integer\Double=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pom文件中增加国内阿里Maven私服的链接地址 --- pom.xml | 17 ++++++++++- .../luckyclient/publicclass/ChangString.java | 28 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 303fb40..0d113af 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,22 @@ GBK - + + + + maven-ali + http://maven.aliyun.com/nexus/content/groups/public + + true + + + true + always + fail + + + + junit diff --git a/src/main/java/luckyclient/publicclass/ChangString.java b/src/main/java/luckyclient/publicclass/ChangString.java index 3c00c82..bd64a80 100644 --- a/src/main/java/luckyclient/publicclass/ChangString.java +++ b/src/main/java/luckyclient/publicclass/ChangString.java @@ -1,5 +1,6 @@ package luckyclient.publicclass; +import java.math.BigDecimal; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collections; @@ -246,6 +247,31 @@ public class ChangString { COUNTER++; } } + //Longͻȡֵ + if(entry.getValue() instanceof Long){ + if(key.equals(entry.getKey())){ + if(keyindex==COUNTER){ + luckyclient.publicclass.LogUtil.APP.info("ԭʼLongֵ"+entry.getValue()+""); + entry.setValue(Long.valueOf(value)); + luckyclient.publicclass.LogUtil.APP.info("滻Longֵ"+entry.getValue()+""); + BCHANG=true; + } + COUNTER++; + } + } + //Doubleͻȡֵ + if(entry.getValue() instanceof BigDecimal){ + if(key.equals(entry.getKey())){ + if(keyindex==COUNTER){ + luckyclient.publicclass.LogUtil.APP.info("ԭʼBigDecimalֵ"+entry.getValue()+""); + BigDecimal bd = new BigDecimal(value); + entry.setValue(bd); + luckyclient.publicclass.LogUtil.APP.info("滻BigDecimalֵ"+entry.getValue()+""); + BCHANG=true; + } + COUNTER++; + } + } //Booleanͻȡֵ if(entry.getValue() instanceof Boolean){ if(key.equals(entry.getKey())){ @@ -320,7 +346,7 @@ public class ChangString { } public static void main(String[] args) { - + } }