package com.changhong.autoform.mapper.fieldvalue.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.stereotype.Component; import com.changhong.autoform.core.mapper.BaseMapper; import com.changhong.autoform.entity.sql.Where; import com.changhong.autoform.entity.sql.select.Select; import com.changhong.autoform.mapper.fieldvalue.FieldValueMapper; @Component("fieldValueMapper") public class FieldValueMapperImpl extends BaseMapper implements FieldValueMapper{ @Override public List selectFormFieldMainValue(Map map) { List list = new ArrayList<>(); Select select = new Select(String.format(map.get("tableName")),null, map.get("field")); select(select, (fields, rs)->{ while(rs.next()){ list.add(rs.getString(1)); } }); return list; } }