⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mobilesectiondaoimpl.java.svn-base

📁 自动导入文件到数据库,用于那些无法实时入库,定点时间入库的需求
💻 SVN-BASE
字号:
package com.onet.autobill.dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.jdbc.core.support.JdbcDaoSupport;

import com.onet.autobill.dao.MobileSectionDao;

public class MobileSectionDaoImpl  extends JdbcDaoSupport implements MobileSectionDao {

	@Override
	public Map<String, String> getMobileSection() {
		
		final Map<String,String> mobileSectionMap = new HashMap<String,String>();

		String sql = "select Mseg,ProvinceId from UT_COMM_MOBILE_SECTION mobile ,"
				+ " ProvinceSection privince"
				+ " where mobile.Prov = privince.ProvinceNm";
		
		try {
			getJdbcTemplate().query(sql, new RowCallbackHandler() {
				public void processRow(ResultSet rs) throws SQLException {
					do {
						mobileSectionMap.put(rs.getString("Mseg"), rs.getString("ProvinceId"));
					} while (rs.next());
				}
			});
		} catch (Exception e) {
			logger.error("", e);
		}
		return mobileSectionMap;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -