Browse Source

修改状态显示

zhaojinyu 1 week ago
parent
commit
e87ead9c07

+ 3 - 3
base-modules/service-file/src/main/java/com/ruoyi/file/service/impl/FileUpdateInfoServiceImpl.java

@@ -75,7 +75,7 @@ public class FileUpdateInfoServiceImpl implements FileUpdateInfoService {
         if (!localFile.exists()) {
             // 如果本地文件不存在,设置状态为“待更新”
             fileUpdateInfo.setRemoteMd5(remoteFileMd5);
-            fileUpdateInfo.setUpdateStatus("待更新");
+            fileUpdateInfo.setUpdateStatus("版本待检测");
             fileUpdateInfoMapper.updateById(fileUpdateInfo);
             return true;
         } else {
@@ -83,7 +83,7 @@ public class FileUpdateInfoServiceImpl implements FileUpdateInfoService {
             String localFileMd5 = DigestUtils.md5Hex(new FileInputStream(localFile));
             boolean isUpdateRequired = !localFileMd5.equals(remoteFileMd5);
             fileUpdateInfo.setRemoteMd5(remoteFileMd5);
-            fileUpdateInfo.setUpdateStatus(isUpdateRequired ? "更新" : "无需更新");
+            fileUpdateInfo.setUpdateStatus(isUpdateRequired ? "有新版本需更新" : "无需更新");
             fileUpdateInfoMapper.updateById(fileUpdateInfo);
             return isUpdateRequired;
         }
@@ -126,7 +126,7 @@ public class FileUpdateInfoServiceImpl implements FileUpdateInfoService {
             String newFileMd5 = DigestUtils.md5Hex(new FileInputStream(localFilePath));
             fileUpdateInfo.setFileMd5(newFileMd5);
             fileUpdateInfo.setUpdateTime(new Date());
-            fileUpdateInfo.setUpdateStatus("已更新");
+            fileUpdateInfo.setUpdateStatus("已是最新版本");
 
             // 递增版本号
             String currentVersion = fileUpdateInfo.getVersion();