Commit b87d1967 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.6.10' into MVP1.6.10

parents 32d7a137 61c672a0
......@@ -42,7 +42,7 @@ public class FileUploadServiceImpl implements FileUploadService {
private AtomicInteger atomicInteger = new AtomicInteger(0);
//初始化附件上传队列上限值
private int maxLimit = 10;
private int maxLimit = 1;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
......@@ -260,7 +260,7 @@ public class FileUploadServiceImpl implements FileUploadService {
public R getR(MultipartFile file, String filePath, Integer type, String domain, String uploadType) {
if (atomicInteger.intValue() < maxLimit){
try {
atomicInteger.getAndAdd(1);
atomicInteger.incrementAndGet();
Thread.sleep(1000);
log.error("atomicInteger+1:"+atomicInteger.intValue());
if (CommonConstants.ZERO_STRING.equals(uploadType)){
......@@ -271,7 +271,7 @@ public class FileUploadServiceImpl implements FileUploadService {
}catch (Exception e){
log.error("附件上传异常:",e);
}finally {
atomicInteger.getAndAdd(-1);
atomicInteger.decrementAndGet();
log.error("atomicInteger-1:"+atomicInteger.intValue());
}
}else {
......
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