package com.chinacreator.process.dao;

import java.sql.SQLException;
import org.springframework.stereotype.Component;
import com.chinacreator.process.bean.WxcsBean;
import com.chinacreator.process.util.DataSource;
import com.frameworkset.common.poolman.SQLExecutor;

@Component
public class WxcsDao {

	  public WxcsBean getConfig(String cpid,String spid) throws SQLException{
		String sql = "select cpid,spid,totalvip,to_char(vipstarttime,'yyyymmddhh24miss') vipstarttime,to_char(vipendtime,'yyyymmddhh24miss') vipendtime,vipstatus,"
				+ " vipurl,viptype,flowstatus,to_char(flowstarttime,'yyyymmddhh24miss') flowstarttime,to_char(flowendtime,'yyyymmddhh24miss') flowendtime  from tb_wxcs_config where cpid =? and spid =?";
		return SQLExecutor.queryObjectWithDBName(WxcsBean.class, DataSource.NET3G, sql, cpid,spid);
	}
}
