| | |
| | | |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.db.dao.IQueryServiceDAO; |
| | | import com.java110.entity.order.ServiceBusiness; |
| | | import com.java110.entity.service.ServiceSql; |
| | | import com.java110.dto.system.ServiceBusiness; |
| | | import com.java110.dto.system.ServiceSql; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | //精髓的地方就在这里,类ResultSet有getMetaData()会返回数据的列和对应的值的信息,然后我们将列名和对应的值作为map的键值存入map对象之中... |
| | | ResultSetMetaData rsmd = rs.getMetaData(); |
| | | if (columns != null) { |
| | | for (int i = 1; i < rsmd.getColumnCount(); i++) { |
| | | columns.add(rsmd.getColumnLabel(i)); |
| | | for (int i = 0; i < rsmd.getColumnCount(); i++) { |
| | | columns.add(rsmd.getColumnLabel(i+1)); |
| | | } |
| | | } |
| | | while (rs.next()) { |