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

📄 cityqueryimpl.java

📁 电信的网厅的整站代码
💻 JAVA
字号:
package com.doone.fj1w.fjmgr.order.list;

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

import com.doone.data.DataTable;
import com.doone.fj1w.fjmgr.order.DAO;
import com.doone.util.FileLogger;

/**
 * <strong>
 *  地市查询
 * </strong>
 * @author Administrator
 *
 */
public class CityQueryImpl extends DAO implements QueryListInterface {

	static FileLogger _logger = new FileLogger();
	
    private static final long serialVersionUID = -4324325454341L;
    //查询
    private String citycode = "";
    
    /**SQL Statement*/
    private final String SQL_QUE_CITY 
       = "select t.citycode as OPTIONVALUE,t.cityname as OPTIONTEXT " +
         "from td_city t";
    
    private final String SQL_QUE_CITY_SING 
        = "select t.citycode as OPTIONVALUE,t.cityname as OPTIONTEXT " +
          "from td_city t where t.citycode=?";
 
    
    public CityQueryImpl() {
    }
    
    /*
     *  (non-Javadoc)
     * @param Map map
     * @see com.doone.fj1w.common.taglib.list.QueryListInterface#getList()
     */
    public DataTable getList(Map map) throws RuntimeException { 
        try{
            if(map == null)
                return _dac.executeQuery(SQL_QUE_CITY);
            
            citycode = (String)map.get("CITYCODE");
            
            if(citycode != null && !citycode.equals(""))
               return _dac.executeQuery(SQL_QUE_CITY_SING, 
                                        new Object[]{citycode}); 
            
            return _dac.executeQuery(SQL_QUE_CITY);
        }catch(SQLException sqlx){
            _logger.warn(sqlx.getMessage(),sqlx);
            throw new RuntimeException(sqlx);
        }catch(RuntimeException rux){
            _logger.warn(rux.getMessage(),rux);
            throw new RuntimeException(rux);
        }
    }

}

⌨️ 快捷键说明

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