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) { - + } }