package com.community.commom.utils;

/**
 * 金额工具类
 */
public class PayPriceUtils {

    /**
     * 元转换为分
     * @param price
     * @return
     */
    public static Integer yuanConversionPoints(Integer price) {
         return  price * 100;
    }

    /**
     * 元转换为分
     * @param price
     * @return
     */
    public static Integer yuanConversionPoints(Double price) {
        Double d = price * 100;
        String strD = d+"";
        return  Integer.parseInt(strD.substring(0, strD.lastIndexOf(".")));
    }

}
