1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| package com.taoke.autopay.utils;
|
| import java.math.BigDecimal;
| import java.math.RoundingMode;
|
| /**
| * @author hxh
| * @title: MoneyUtil
| * @description: TODO
| * @date 2024/7/8 23:29
| */
| public class MoneyUtil {
|
| public static String getMoneyStr(BigDecimal money) {
| if(money==null){
| return "";
| }
| return money.setScale(2, RoundingMode.HALF_UP).toString();
|
| }
|
| }
|
|