package com.winsun.utils;

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

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

/**
 * 实体类工具类
 *
 *
 */
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;
	} 
}
