package com.cool.store.utils;

import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;

/**
 * <p>
 * 公共工具
 * </p>
 *
 * @author wangff
 * @since 2025/10/29
 */
public class CommonUtil {
    public static BigDecimal convertToBig(String value) {
        if (StringUtils.isBlank(value)) {
            return BigDecimal.ZERO;
        }
        try {
            return new BigDecimal(value);
        } catch (Exception ignored) {}
        return BigDecimal.ZERO;
    }
}
