|
@@ -56,11 +56,12 @@ public class DownloadController {
|
|
|
|
|
|
TBOrgDownloadBean tbOrgDownloadBean = GsonUtil.fromJson(GsonUtil.toJson(tbOrg), TBOrgDownloadBean.class);
|
|
|
TBClientVersion tbClientVersion = tbClientVersionService.getLastUploadClientVersion(tbOrg.getId());
|
|
|
- if (Objects.nonNull(tbClientVersion)) {
|
|
|
- VersionBean v = new VersionBean(tbClientVersion.getName(), tbClientVersion.getValue(), tbClientVersion.getUrl());
|
|
|
- tbOrgDownloadBean.setVersion(v);
|
|
|
- tbOrgDownloadBean.setPackagePath(v.getUrl());
|
|
|
+ if (Objects.isNull(tbClientVersion)) {
|
|
|
+ tbClientVersion = tbClientVersionService.getMaxClientVersion();
|
|
|
}
|
|
|
+ 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("超级管理员无需下载");
|