package com.chinacreator.process.dao;

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

import org.apache.commons.lang.math.NumberUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

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

@Component
public class PushTwDao {


    /**
     * 查询前向产品对应的后向产品
     * @param cpid
     * @param spid
     * @return
     * @throws SQLException
     */
    public  String qryRelaFtoH(String cpid,String spid) throws SQLException{
        String sql = " SELECT hspid FROM TB_FORONTBACK_RELA_CONFIG  WHERE   CPID = ? AND FSPID = ? AND status = 0";
        return  SQLExecutor.queryFieldWithDBName(DataSource.NET3G, sql, new Object[] {cpid,spid});
    }


    public static void main(String[] args) throws SQLException {
        PushTwDao p = new PushTwDao();
        String str = p.qryRelaFtoH("youtu","1167");
        System.out.println(str);

    }
}
