package com.caimei.www.utils;

/**
 * Description
 *
 * @author : Charles
 * @date : 2020/6/22
 */
public class PriceUtil {
    /**
     * 根据价格返回价格等级
     * @param price 价格
     * @return priceGrade 价格等级
     */
    public static Integer getPriceGrade(Double price){
        int grade = 1;
        if (price > 50 * 10000) {
            grade = 5;
        } else if (price > 25 * 10000) {
            grade = 4;
        } else if (price > 10 * 10000) {
            grade = 3;
        } else if (price > 2.5 * 10000) {
            grade = 2;
        }
        return grade;
    }

}
