Commit 18ebbb50 authored by 周健威's avatar 周健威

修改代码

parent ae57af5b
......@@ -3,6 +3,7 @@ package com.upyuns.platform.rs.universal.service;
import cn.hutool.core.img.ImgUtil;
import cn.hutool.core.io.FileUtil;
import com.github.wxiaoqi.security.common.util.UUIDUtils;
import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.upyuns.platform.rs.universal.constant.RedisKey;
import com.upyuns.platform.rs.universal.controller.UploadController;
......@@ -62,9 +63,10 @@ public class UploadService {
String filePath = baseUploadPath + realFileRelPath;
//将文件写入指定位置
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
redisTemplate.opsForValue().setIfAbsent(realFileRelPath, filePath);
String key = "shp:"+ UUIDUtils.generateShortUuid();
redisTemplate.opsForValue().setIfAbsent(key, filePath);
// realFileRelPath=xx_url+SystemConfig.XXMP_URL+realFileRelPath;
return realFileRelPath;
return key;
}
/**
......
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