浏览代码

BUG修复

wangliang 2 年之前
父节点
当前提交
22f845506d
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      themis-admin/src/main/java/com/qmth/themis/admin/api/DownloadController.java

+ 5 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/DownloadController.java

@@ -59,9 +59,11 @@ public class DownloadController {
             if (Objects.isNull(tbClientVersion)) {
                 tbClientVersion = tbClientVersionService.getMaxClientVersion();
             }
-            VersionBean v = new VersionBean(tbClientVersion.getName(), tbClientVersion.getValue(), tbClientVersion.getUrl());
-            tbOrgDownloadBean.setVersion(v);
-            tbOrgDownloadBean.setPackagePath(v.getUrl());
+            if (Objects.nonNull(tbClientVersion)) {
+                VersionBean v = new VersionBean(tbClientVersion.getName(), tbClientVersion.getValue(), tbClientVersion.getUrl());
+                tbOrgDownloadBean.setVersion(v);
+                tbOrgDownloadBean.setPackagePath(v.getUrl());
+            }
             return ResultUtil.ok(tbOrgDownloadBean);
         } else {
             throw new BusinessException("超级管理员无需下载");