package com.winsun.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.poi.ss.formula.functions.T;
import org.springframework.cglib.beans.BeanMap;

/**
 * 实体类工具类
 * @author dongyp
 *
 */
public class EntityUtil {
	
	@SuppressWarnings("unchecked")
	public static List<Map<String, Object>> entityToMap(List<T> list){
		List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();
		for(T entity : list) {
			resultList.add(BeanMap.create(entity));
		}
			
		return resultList;
	} 
}
