Commit 60a22c1b authored by hongguangwu's avatar hongguangwu

1.7.21-优化

parent b47e1ded
......@@ -117,6 +117,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
@Override
public R<String> pushFriend(List<String> dispatchIdList, List<String> pushDispatchIdList, Integer isAuto, String userId) {
if (atomicPushFriend.incrementAndGet() <= 1) {
// 先清理上一次的文件
cleanSpireTempFiles();
try {
TSocialFreindSet set = tSocialFreindSetService.getById("1");
if (set != null && Common.isNotNull(set.getType()) && 1 == set.getType()) {
......@@ -190,7 +192,6 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
} finally {
atomicPushFriend.decrementAndGet();
cleanSpireTempFiles();
}
return R.ok();
} else {
......
......@@ -90,7 +90,12 @@ public class ExcelToImage {
return R.failed(CommonConstants.RESULT_DATA_FAIL+toImagConvertError+e.getMessage());
} finally {
if (wb != null) {
wb.dispose(); // 重要:释放资源并删除临时文件
try {
wb.dispose();
Thread.sleep(100);
} catch (Exception e) {
e.printStackTrace();
}
}
if (tempFile != null && tempFile.exists()){
tempFile.delete();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment