Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qwgame
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵国君
qwgame
Commits
2c0e85e6
Commit
2c0e85e6
authored
Apr 18, 2019
by
hxw2303632
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正确关闭sql连接
parent
bccbf33e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
ChatCacheController.java
...m/qiwu/chatbotbackend/processing/ChatCacheController.java
+12
-3
No files found.
src/main/java/com/qiwu/chatbotbackend/processing/ChatCacheController.java
View file @
2c0e85e6
...
@@ -124,12 +124,19 @@ public class ChatCacheController {
...
@@ -124,12 +124,19 @@ public class ChatCacheController {
opFlag
=
helper
.
insertArchiveInfo
(
archiveName
,
userKey
,
site
);
opFlag
=
helper
.
insertArchiveInfo
(
archiveName
,
userKey
,
site
);
if
(
destroy
)
if
(
destroy
)
{
helper
.
destroy
();
helper
.
destroy
();
destroy
=
false
;
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"游戏存档时发生异常"
);
System
.
out
.
println
(
"游戏存档时发生异常"
);
opFlag
=
false
;
opFlag
=
false
;
}
finally
{
if
(
helper
!=
null
&&
destroy
){
helper
.
destroy
();
}
}
}
return
opFlag
;
return
opFlag
;
...
@@ -239,7 +246,7 @@ public class ChatCacheController {
...
@@ -239,7 +246,7 @@ public class ChatCacheController {
String
fileDir
=
System
.
getProperty
(
"user.dir"
)
+
"/ChatCache"
;
String
fileDir
=
System
.
getProperty
(
"user.dir"
)
+
"/ChatCache"
;
Boolean
findFlag
=
false
;
Boolean
findFlag
=
false
;
SqlHelper
helper
;
SqlHelper
helper
=
null
;
Map
<
String
,
String
>
infoPoints
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
infoPoints
=
new
HashMap
<
String
,
String
>();
try
{
try
{
...
@@ -273,7 +280,7 @@ public class ChatCacheController {
...
@@ -273,7 +280,7 @@ public class ChatCacheController {
System
.
out
.
println
(
"sql:"
+
userKey
);
System
.
out
.
println
(
"sql:"
+
userKey
);
archiveInfo
=
helper
.
queryUserLastGameArchive
(
userKey
);
archiveInfo
=
helper
.
queryUserLastGameArchive
(
userKey
);
helper
.
destroy
();
findFlag
=
(
archiveInfo
!=
null
);
findFlag
=
(
archiveInfo
!=
null
);
}
}
...
@@ -281,6 +288,8 @@ public class ChatCacheController {
...
@@ -281,6 +288,8 @@ public class ChatCacheController {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
findFlag
=
false
;
findFlag
=
false
;
}
finally
{
helper
.
destroy
();
}
}
System
.
out
.
println
(
"finalFlag"
+
findFlag
);
System
.
out
.
println
(
"finalFlag"
+
findFlag
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment