package com.chinacreator.process.dao;

import java.sql.SQLException;

import org.springframework.stereotype.Component;

import com.chinacreator.process.bean.ECBBean;
import com.chinacreator.process.util.DataSource;
import com.frameworkset.common.poolman.SQLExecutor;

@Component
public class EcbConfigDao {

	public ECBBean queryConfig(String spid,String cpid,String province) throws SQLException{
		String sql = "select * from tb_ecb_config where status != 2  and spid = ? and cpid = ? and (province = ? or province='0') order by province desc";
		return SQLExecutor.queryObjectWithDBName(ECBBean.class, DataSource.NET3G, sql, spid,cpid,province);
	}
}
