VE2eIbpOrderFinishDao.java 1.71 KB
package com.sitech.ismp.coll.busi.e2e.dao;

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

import com.sitech.ismp.coll.busi.e2e.domain.VE2eIbpOrderFinish;
import com.sitech.util.DES3;

public class VE2eIbpOrderFinishDao extends OracleBaseDao {

	public VE2eIbpOrderFinishDao(Map<String, String> params) {
		super(params);
	}

	@SuppressWarnings("unchecked")
	public List<VE2eIbpOrderFinish> selectVE2eIbpOrderFinish(String productTag,
			Date fileTime) {
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("PRODUCT_TAG", productTag);
		map.put("FILE_TIME", fileTime);
		map.put("CLIENT_TYPE", "住宅");
		map.put("ORDER_STATUS", "('BOOK','SUSPEND','BILLDEAL')");

		try {
			return sqlmapClient.queryForList("selectVE2eIbpOrderFinish", map);
		} catch (SQLException e) {
			error.error("Exception while selectVE2eIbpOrderFinish", e);
			return null;
		}
	}

	@SuppressWarnings("unchecked")
	public List<VE2eIbpOrderFinish> selectVE2eIbpOrderFinishByP6(String p6Id) {
		try {
			return sqlmapClient.queryForList("selectVE2eIbpOrderFinishByP6", p6Id);
		} catch (SQLException e) {
			error.error("Exception while selectVE2eIbpOrderFinishByP6", e);
			return null;
		}
	}
	
	public static void main(String[] args) {
		Map<String,String> params = new HashMap<String, String>();
		params.put("JDBC.Driver", "oracle.jdbc.driver.OracleDriver");
		params.put("JDBC.ConnectionURL", "jdbc:oracle:thin:@172.21.0.77:1527:bnms");
		params.put("JDBC.Username", "bnms15");		
		params.put("JDBC.Password", DES3.encrypt("bnms15"));
		VE2eIbpOrderFinishDao dao = new VE2eIbpOrderFinishDao(params);

		System.out.println(dao.selectVE2eIbpOrderFinishByP6("31166139"));
	}
}