Commit 9197a272 by 董有沛

工具类修改

parent 8d9c8598
...@@ -30,8 +30,8 @@ public class MapUtil { ...@@ -30,8 +30,8 @@ public class MapUtil {
* @param key 作为key的字段名 * @param key 作为key的字段名
* @return * @return
*/ */
public static Map<String,Object> listToMap(List<Map<String, Object>> list,String key){ public static Map<String,Map<String,Object>> listToMap(List<Map<String, Object>> list,String key){
Map<String,Object> map = new HashMap<String, Object>(); Map<String,Map<String,Object>> map = new HashMap<String, Map<String,Object>>();
for(Map<String, Object> theMap : list) { for(Map<String, Object> theMap : list) {
if(null != theMap.get(key)) { if(null != theMap.get(key)) {
map.put(theMap.get(key).toString(), theMap); map.put(theMap.get(key).toString(), theMap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment