import java.sql.CallableStatement;
import java.sql.Connection;
import com.zte.cms.platform.util.db.DBUtil;
public class ConClickThread implements Runnable{
//app_fr.PKG_P2P_CONTRACTTRANS. pro_newclick_stat (5, null, 合同id, 用户电脑号);--用于手机合同点击率
//app_fr.PKG_P2P_CONTRACTTRANS. pro_newclick_stat (22, null, 合同id, 用户电脑号);--用于设备合同点击率
/**
* 类型:手机5、设备22、邮件等
*/
private String statType="";
/**
* 合同id
*/
private String conid="";
/**
* 用户电脑号短工号
*/
private String userno="";
public void run() { // 实现run方法
insertData();
}
public String insertData() {
String strData = null;
Connection conn = null;
CallableStatement pstmt = null;
try
{
String sql = " {call app_fr.PKG_P2P_CONTRACTTRANS.pro_newclick_stat@CMS_TO_WMS(?,null,?,?) } ";
conn = DBUtil.getConnection();
pstmt = conn.prepareCall(sql);
pstmt.setString(1, statType);
pstmt.setString(2, conid);
pstmt.setString(3, userno);
pstmt.execute();
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
if (pstmt != null)
{
pstmt.close();
}
if (conn != null)
{
conn.close();
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
return strData;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// ConClickThread c=new ConClickThread();
// c.setConid("1293862");
// c.setStatType("22");
// c.setUserno("10044953");
// Thread t=new Thread(c);
// t.start();
}
public String getConid() {
return conid;
}
public void setConid(String conid) {
this.conid = conid;
}
public String getStatType() {
return statType;
}
public void setStatType(String statType) {
this.statType = statType;
}
public String getUserno() {
return userno;
}
public void setUserno(String userno) {
this.userno = userno;
}
}