ruti
解决方案 »
- 请问数据备份怎么做呢?
- 一个java输出的问题
- 请问 javax.servlet.http.HttpServlet 在weblogic 的什么包内?
- TOMCAT自动加载文件
- 【急】用cos_struts上传报错Corrupt form data: premature ending
- jdom安装问题
- StrutsTestCase 空指针
- 请问谁有sql server 7.0的jdbc驱动??
- 高手来帮我看一看,对不对呀。急!!!!!!!!!
- service层查询的对象如何让对象变成游离态
- java access xml SQL Server
- [求助]axis2+tomcat开发webservice的怪异问题
public class GsNotifyImp implements IGsNotify {
private Logger logger = Logger.getLogger(GsNotifyImp.class);
public void orderRelationUpdateNotifyReq(int OPType,String productID,String streamingNo,String userID,int userIDType) {
try {
Statement stmt = DbConn.getConnetion().createStatement();
StringBuffer sql = new StringBuffer();
String spRevId = header.getSpRevId();
String spRevpassword = header.getSpRevpassword();
String spId = header.getSpId();
String SAN = header.getSAN();
String transactionId = header.getTransactionId();
String linkId = header.getLinkId();
StringBuffer aa = new StringBuffer();
if (spRevId != null && !spRevId.equals(""))
aa.append(spRevId).append(",");
else aa.append(",");
if (spRevpassword != null && !spRevpassword.equals(""))
aa.append(spRevpassword).append(",");
else aa.append(",");
if (spId != null && !spId.equals(""))
aa.append(spId).append(",");
else aa.append(",");
if (SAN != null && !SAN.equals(""))
aa.append(SAN).append(",");
else aa.append(",");
if (transactionId != null && !transactionId.equals(""))
aa.append(transactionId).append(",");
else aa.append(",");
if (linkId != null && !linkId.equals(""))
aa.append(linkId).append("");
sql.append("insert into T_ISAPNOTIFY(STREAMINGNO,USERID,USERIDTYPE,PRODUCTID,OPTYPE,RMK,REPORT_FLAG) values(");
if (streamingNo != null && !streamingNo.equals(""))
sql.append("'").append(streamingNo).append("',");//STREAMINGNO
if(userID !=null && !userID.equals(""))
sql.append("'").append(userID).append("',");//USERID
sql.append(userIDType).append(",");//USERIDTYPE
if (productID != null && !productID.equals(""))
sql.append("'").append(productID).append("',");//PRODUCTID
sql.append(OPType).append(",");//OPTYPE
if (aa != null && !aa.equals(""))
sql.append("'").append(aa.toString()).append("',");//RMK
sql.append(0).append(")");//REPORT_TYPE
System.out.println("SQLStr==>" + sql.toString());
stmt.execute(sql.toString());
//-------------------------
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm:ss");
System.out.println("插入成功");
System.out.println("时间:"+sdf.format(new Date()));
//-------------------------
}
catch (SQLException e) {
System.out.println("SQLException:" + e.getMessage());
}
catch (Exception e) {
System.out.println(e.toString());
}finally {
DbConn.closeCn();
}
}}