|
|
@@ -245,14 +245,14 @@ public class TtMerchantPoiController extends DouyinBaseController { |
|
|
logger.error("poi import error.",e); |
|
|
logger.error("poi import error.",e); |
|
|
throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); |
|
|
throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); |
|
|
} finally { |
|
|
} finally { |
|
|
|
|
|
if (isSetCacheLock) { |
|
|
|
|
|
stringRedisTemplate.expire(importKey,3,TimeUnit.SECONDS); |
|
|
|
|
|
stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", "1"); |
|
|
|
|
|
} |
|
|
if (fos != null) { |
|
|
if (fos != null) { |
|
|
try { |
|
|
try { |
|
|
fos.close(); |
|
|
fos.close(); |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
if (isSetCacheLock) { |
|
|
|
|
|
stringRedisTemplate.expire(importKey,3,TimeUnit.SECONDS); |
|
|
|
|
|
stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", "1"); |
|
|
|
|
|
} |
|
|
|
|
|
logger.error("poi import error.",e); |
|
|
logger.error("poi import error.",e); |
|
|
throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); |
|
|
throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); |
|
|
} |
|
|
} |
|
|
@@ -261,10 +261,6 @@ public class TtMerchantPoiController extends DouyinBaseController { |
|
|
try { |
|
|
try { |
|
|
fs.close(); |
|
|
fs.close(); |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
if (isSetCacheLock) { |
|
|
|
|
|
stringRedisTemplate.expire(importKey,3,TimeUnit.SECONDS); |
|
|
|
|
|
stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", "1"); |
|
|
|
|
|
} |
|
|
|
|
|
logger.error("poi import error.",e); |
|
|
logger.error("poi import error.",e); |
|
|
throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); |
|
|
throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); |
|
|
} |
|
|
} |
|
|
|