1
This commit is contained in:
@@ -26,7 +26,7 @@ public class VersionController extends BaseController {
|
||||
@Autowired
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
private static final String VERSION_REDIS_KEY = "erp:client:version";
|
||||
private static final String DOWNLOAD_URL_REDIS_KEY = "erp:client:download:url";
|
||||
private static final String DOWNLOAD_URL_REDIS_KEY = "erp:client:url";
|
||||
|
||||
/**
|
||||
* 检查版本更新
|
||||
@@ -85,23 +85,12 @@ public class VersionController extends BaseController {
|
||||
public AjaxResult updateVersionInfo(@RequestParam("version") String version,
|
||||
@RequestParam("downloadUrl") String downloadUrl) {
|
||||
try {
|
||||
if (StringUtils.isEmpty(version)) {
|
||||
return AjaxResult.error("版本号不能为空");
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(downloadUrl)) {
|
||||
return AjaxResult.error("下载链接不能为空");
|
||||
}
|
||||
|
||||
// 更新Redis中的版本信息和下载链接
|
||||
redisTemplate.opsForValue().set(VERSION_REDIS_KEY, version);
|
||||
redisTemplate.opsForValue().set(DOWNLOAD_URL_REDIS_KEY, downloadUrl);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("version", version);
|
||||
result.put("downloadUrl", downloadUrl);
|
||||
result.put("updateTime", System.currentTimeMillis());
|
||||
|
||||
return AjaxResult.success("版本信息更新成功", result);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("版本信息更新失败: " + e.getMessage());
|
||||
|
||||
@@ -42,9 +42,6 @@ public class FileController {
|
||||
|
||||
@PostMapping("/uploads")
|
||||
public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files) {
|
||||
if (files == null || files.isEmpty()) {
|
||||
return AjaxResult.error("没有选择文件");
|
||||
}
|
||||
|
||||
List<FileDto> fileDtoS = new ArrayList<>();
|
||||
for (MultipartFile file : files) {
|
||||
|
||||
Reference in New Issue
Block a user