Utils.java 670 Bytes
/*
 *
 * Copyright (c) 2001-2019 泛微软件.
 * 泛微协同商务系统,版权所有.
 *
 */
package com.weaver.esb.util;

/**
 * <p>Title: ${file_name}</p>
 * <p>Description: </p>
 *
 * @author SJZ
 * @date 2019/9/26
 * @version 1.0
 *
 */
public class Utils {

    /**
     * 字符串转换
     * @param value
     * @param defValue
     * @return
     */
    public static int getIntValue(String value, int defValue){
        try {
            if(value!=null && !value.isEmpty()) {
                return Double.valueOf(value.trim()).intValue();
            }
        }catch (Exception e){
            return defValue;
        }
        return defValue;
    }
}