From 81308525b70e1159304e55b1c4ae74e7ebbcf07c Mon Sep 17 00:00:00 2001
From: chenlw <874313221@qq.com>
Date: Wed, 21 Dec 2016 14:58:28 +0800
Subject: [PATCH] =?UTF-8?q?sql=E6=97=A5=E5=BF=97=EF=BC=8C=E6=89=A7?=
 =?UTF-8?q?=E8=A1=8C=E5=89=8D=E5=85=88=E6=8A=8Asql=E5=86=99=E8=BF=9B?=
 =?UTF-8?q?=E6=97=A5=E5=BF=97=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/com/platform/oracle/OracleConnector.java | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/com/platform/oracle/OracleConnector.java b/src/com/platform/oracle/OracleConnector.java
index 7a3c0b9b..d5d9d5aa 100644
--- a/src/com/platform/oracle/OracleConnector.java
+++ b/src/com/platform/oracle/OracleConnector.java
@@ -69,17 +69,17 @@ public class OracleConnector {
 		}
 		Statement statement = null;
 		try {
+			FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n");
 			statement = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
 					ResultSet.CONCUR_UPDATABLE);
 			resultSet = statement.executeQuery(sql);
 			/*
 			 * if(resultSet.next()){ System.out.println(resultSet.getInt(1)); }
 			 */
-			FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n"
-					+ "OK \r\n");
+			FileOperateHelper.fileWrite(filePath + ".log", "OK \r\n");
 		} catch (SQLException e) {
 			FileOperateHelper.fileWrite(filePath + ".log",
-					sql + "\r\n" + e.getMessage() + "\r\n");
+					e.getMessage() + "\r\n");
 			log.error(Custom4exception.OracleSQL_Except, e);
 		} finally {
 			if (null != statement) {
@@ -121,15 +121,16 @@ public class OracleConnector {
 		boolean flag = false;
 		Statement statement = null;
 		try {
+			FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n");
 			statement = conn.createStatement();
 			int res = statement.executeUpdate(sql);
 			flag = true;
-			FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n执行结果:" + res
+			FileOperateHelper.fileWrite(filePath + ".log", "执行结果:" + res
 					+ " \r\n");
 		} catch (SQLException e) {
 			flag = false;
 			FileOperateHelper.fileWrite(filePath + ".log",
-					sql + "\r\n" + e.getMessage() + "\r\n");
+					e.getMessage() + "\r\n");
 			log.error(Custom4exception.OracleSQL_Except, e);
 		}
 
@@ -151,16 +152,17 @@ public class OracleConnector {
 		boolean flag = false;
 		Statement statement = null;
 		try {
+			FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n");
 			statement = conn.createStatement();
 			int res = statement.executeUpdate(sql);
 			flag = true;
-			FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n 执行结果:"+ res
+			FileOperateHelper.fileWrite(filePath + ".log", "执行结果:"+ res
 					+ " \r\n");
 
 		} catch (SQLException e) {
 			flag = false;
 			FileOperateHelper.fileWrite(filePath + ".log",
-					sql + "\r\n" + e.getMessage() + "\r\n");
+					e.getMessage() + "\r\n");
 			log.error(Custom4exception.OracleSQL_Except, e);
 		} 
 		return flag;