| | |
| | | package cn.ksource.core.util; |
| | | |
| | | import org.apache.commons.lang.StringEscapeUtils; |
| | | import org.apache.commons.lang.StringUtils; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.Method; |
| | | import java.lang.reflect.Modifier; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | import org.apache.commons.lang.StringEscapeUtils; |
| | | import org.apache.commons.lang.StringUtils; |
| | | |
| | | |
| | | public class ConvertUtil { |
| | |
| | | } |
| | | |
| | | public static int obj2Int(Object obj){ |
| | | if(null==obj) { |
| | | System.out.println("1121313"); |
| | | } |
| | | return obj == null || obj.toString().trim().equals("") ? null : Double.valueOf(obj.toString()).intValue(); |
| | | return obj == null || obj.toString().trim().equals("") ? 0 : Double.valueOf(obj.toString()).intValue(); |
| | | } |
| | | |
| | | public static Long obj2Long(Object obj){ |