From 6b479c5774ed3d6e2dc92693ddeda3e7ad1494db Mon Sep 17 00:00:00 2001 From: Andru <769883346@qq.com> Date: 星期一, 23 十月 2023 17:34:08 +0800 Subject: [PATCH] 添加获客方法 --- src/main/java/com/hx/util/MapUtil.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/hx/util/MapUtil.java b/src/main/java/com/hx/util/MapUtil.java index 22ae85c..2bdd0cd 100644 --- a/src/main/java/com/hx/util/MapUtil.java +++ b/src/main/java/com/hx/util/MapUtil.java @@ -1,5 +1,6 @@ package com.hx.util; +import java.math.BigDecimal; import java.util.Map; /** @@ -57,4 +58,20 @@ return null == map.get(key) ? 0 : Integer.parseInt(map.get(key).toString()); } + + /** + * 浠巑ap涓幏鍙栨暟瀛楃被鍨嬪璞� + * @param map + * @param key + * @return + */ + public static BigDecimal getBigDecimal(Map<String, Object> map, String key) + { + if(map == null || StringUtils.isEmpty(key)) + { + return BigDecimal.ZERO; + } + + return null == map.get(key) ? BigDecimal.ZERO : new BigDecimal(map.get(key).toString()); + } } -- Gitblit v1.8.0