Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Y
yifu-mvp
Project
Project
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
fangxinjiang
yifu-mvp
Commits
dab30bf7
You need to sign in or sign up before continuing.
Commit
dab30bf7
authored
Apr 03, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7.21-优化
parent
e76c3712
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+14
-4
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
dab30bf7
...
@@ -205,6 +205,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -205,6 +205,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 此方法是:删除临时文件
// 此方法是:删除临时文件
public
void
cleanSpireTempFiles
()
{
public
void
cleanSpireTempFiles
()
{
try
{
try
{
// 暂停1分钟
try
{
Thread
.
sleep
(
60000
);
}
catch
(
InterruptedException
e
)
{
}
String
tempDirPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
String
tempDirPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
tempDir
=
new
File
(
tempDirPath
);
File
tempDir
=
new
File
(
tempDirPath
);
...
@@ -216,12 +222,16 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -216,12 +222,16 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if
(
spireTempFiles
!=
null
&&
spireTempFiles
.
length
>
0
)
{
if
(
spireTempFiles
!=
null
&&
spireTempFiles
.
length
>
0
)
{
int
count
=
0
;
int
count
=
0
;
long
totalSize
=
0
;
long
totalSize
=
0
;
long
oneMinuteAgo
=
System
.
currentTimeMillis
()
-
60000
;
long
fileSize
;
for
(
File
file
:
spireTempFiles
)
{
for
(
File
file
:
spireTempFiles
)
{
if
(
file
.
isFile
()
&&
file
.
canWrite
())
{
if
(
file
.
isFile
()
&&
file
.
canWrite
())
{
long
fileSize
=
file
.
length
();
if
(
file
.
isFile
()
&&
file
.
canWrite
()
&&
file
.
lastModified
()
<
oneMinuteAgo
)
{
if
(
file
.
delete
())
{
fileSize
=
file
.
length
();
count
++;
if
(
file
.
delete
())
{
totalSize
+=
fileSize
;
count
++;
totalSize
+=
fileSize
;
}
}
}
}
}
}
}
...
...
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