Merge remote-tracking branch 'origin/master'
| | |
| | | package com.hx.util; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | return null == map.get(key) ? 0 : Integer.parseInt(map.get(key).toString()); |
| | | } |
| | | |
| | | /** |
| | | * 从map中获取数字类型对象 |
| | | * @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()); |
| | | } |
| | | } |