| | |
| | | */ |
| | | public static <T1, T2> T2 covertBean(T1 orgBean, T2 dstBean) { |
| | | |
| | | if(orgBean == null){ |
| | | return dstBean; |
| | | } |
| | | |
| | | try { |
| | | //BeanUtils.copyProperties(dstBean, orgBean); |
| | | if (orgBean instanceof Map) { |
| | |
| | | //System.out.println("字段类型" + dstClass); |
| | | |
| | | Object value = orgMap.get(field.getName()); |
| | | if(value == null){ |
| | | continue; |
| | | } |
| | | //String 转date |
| | | Object tmpValue = Java110Converter.getValue(value, dstClass); |
| | | System.out.println("tmpValue"+value.toString()); |
| | | //System.out.println("tmpValue"+value.toString()); |
| | | beanMap.put(field.getName(), tmpValue); |
| | | } |
| | | } |