Commit ff6fcf5af32a7a126e9ef3c5544d4ad11da07dba
1 parent
7c8996da
fix: 文件大小上线调高100MB
Showing
7 changed files
with
11 additions
and
16 deletions
ruoyi-admin/src/main/java/com/ruoyi/controller/ApplicationUpdateController.java
| @@ -28,7 +28,7 @@ public class ApplicationUpdateController { | @@ -28,7 +28,7 @@ public class ApplicationUpdateController { | ||
| 28 | */ | 28 | */ |
| 29 | @GetMapping("/version/check/{currentVersion}") | 29 | @GetMapping("/version/check/{currentVersion}") |
| 30 | @ApiOperation("校验版本号") | 30 | @ApiOperation("校验版本号") |
| 31 | - public AjaxResult checkVersionNum(@PathVariable("currentVersion") String currentVersion) { | 31 | + public AjaxResult checkVersionNum(@PathVariable("currentVersion") Integer currentVersion) { |
| 32 | return AjaxResult.success(appService.checkVersionNum(currentVersion)); | 32 | return AjaxResult.success(appService.checkVersionNum(currentVersion)); |
| 33 | } | 33 | } |
| 34 | 34 |
ruoyi-admin/src/main/java/com/ruoyi/pojo/response/ApplicationResponseVo.java
| @@ -15,11 +15,11 @@ public class ApplicationResponseVo { | @@ -15,11 +15,11 @@ public class ApplicationResponseVo { | ||
| 15 | @ApiModelProperty("是否强制更新") | 15 | @ApiModelProperty("是否强制更新") |
| 16 | Boolean forceUpdate; | 16 | Boolean forceUpdate; |
| 17 | @ApiModelProperty("更新版本号") | 17 | @ApiModelProperty("更新版本号") |
| 18 | - String versionNum; | 18 | + Integer versionNum; |
| 19 | @ApiModelProperty("更新apk的url") | 19 | @ApiModelProperty("更新apk的url") |
| 20 | String apkUrl; | 20 | String apkUrl; |
| 21 | private ApplicationResponseVo(){ } | 21 | private ApplicationResponseVo(){ } |
| 22 | - public ApplicationResponseVo appNoUpdate(String versionNum){ | 22 | + public ApplicationResponseVo appNoUpdate(Integer versionNum){ |
| 23 | this.updateFlag = false; | 23 | this.updateFlag = false; |
| 24 | this.forceUpdate = false; | 24 | this.forceUpdate = false; |
| 25 | this.versionNum = versionNum; | 25 | this.versionNum = versionNum; |
| @@ -33,7 +33,7 @@ public class ApplicationResponseVo { | @@ -33,7 +33,7 @@ public class ApplicationResponseVo { | ||
| 33 | * @param apkUrl | 33 | * @param apkUrl |
| 34 | * @return | 34 | * @return |
| 35 | */ | 35 | */ |
| 36 | - public ApplicationResponseVo appNormalUpdate(String versionNum,String apkUrl){ | 36 | + public ApplicationResponseVo appNormalUpdate(Integer versionNum,String apkUrl){ |
| 37 | this.updateFlag = true; | 37 | this.updateFlag = true; |
| 38 | this.forceUpdate = false; | 38 | this.forceUpdate = false; |
| 39 | this.versionNum = versionNum; | 39 | this.versionNum = versionNum; |
| @@ -47,7 +47,7 @@ public class ApplicationResponseVo { | @@ -47,7 +47,7 @@ public class ApplicationResponseVo { | ||
| 47 | * @param apkUrl | 47 | * @param apkUrl |
| 48 | * @return | 48 | * @return |
| 49 | */ | 49 | */ |
| 50 | - public ApplicationResponseVo appForceUpdate(String versionNum,String apkUrl){ | 50 | + public ApplicationResponseVo appForceUpdate(Integer versionNum,String apkUrl){ |
| 51 | this.updateFlag = true; | 51 | this.updateFlag = true; |
| 52 | this.forceUpdate = true; | 52 | this.forceUpdate = true; |
| 53 | this.versionNum = versionNum; | 53 | this.versionNum = versionNum; |
ruoyi-admin/src/main/java/com/ruoyi/service/AppService.java
| @@ -34,7 +34,7 @@ public class AppService { | @@ -34,7 +34,7 @@ public class AppService { | ||
| 34 | @Autowired | 34 | @Autowired |
| 35 | private VersionUpgradeMapper versionUpgradeMapper; | 35 | private VersionUpgradeMapper versionUpgradeMapper; |
| 36 | 36 | ||
| 37 | - public ApplicationResponseVo checkVersionNum(String versionNum) { | 37 | + public ApplicationResponseVo checkVersionNum(Integer versionNum) { |
| 38 | // 比对版本 需要更新 判断是否需要强制更新 | 38 | // 比对版本 需要更新 判断是否需要强制更新 |
| 39 | VersionUpgrade vu = versionUpgradeMapper.queryLatestVersionNum(); | 39 | VersionUpgrade vu = versionUpgradeMapper.queryLatestVersionNum(); |
| 40 | // 无需更新 | 40 | // 无需更新 |
ruoyi-admin/src/main/java/com/ruoyi/upgrade/domain/VersionUpgrade.java
| @@ -41,7 +41,7 @@ public class VersionUpgrade extends BaseEntity | @@ -41,7 +41,7 @@ public class VersionUpgrade extends BaseEntity | ||
| 41 | /** 版本标识 */ | 41 | /** 版本标识 */ |
| 42 | @Excel(name = "版本标识") | 42 | @Excel(name = "版本标识") |
| 43 | @ApiModelProperty("版本标识") | 43 | @ApiModelProperty("版本标识") |
| 44 | - private String versionCode; | 44 | + private Integer versionCode; |
| 45 | 45 | ||
| 46 | /** 是否升级 */ | 46 | /** 是否升级 */ |
| 47 | @Excel(name = "是否升级") | 47 | @Excel(name = "是否升级") |
ruoyi-admin/src/main/java/com/ruoyi/upgrade/service/impl/VersionUpgradeServiceImpl.java
| @@ -52,11 +52,6 @@ public class VersionUpgradeServiceImpl implements IVersionUpgradeService { | @@ -52,11 +52,6 @@ public class VersionUpgradeServiceImpl implements IVersionUpgradeService { | ||
| 52 | @Override | 52 | @Override |
| 53 | public int insertVersionUpgrade(VersionUpgrade versionUpgrade) { | 53 | public int insertVersionUpgrade(VersionUpgrade versionUpgrade) { |
| 54 | versionUpgrade.setCreateTime(DateUtils.getNowDate()); | 54 | versionUpgrade.setCreateTime(DateUtils.getNowDate()); |
| 55 | - String[] split = versionUpgrade.getVersionCode().split("."); | ||
| 56 | - if (split.length == 2){ | ||
| 57 | - versionUpgrade.setVersionId(Integer.parseInt(split[0])); | ||
| 58 | - versionUpgrade.setVersionMini(Integer.parseInt(split[1])); | ||
| 59 | - } | ||
| 60 | return versionUpgradeMapper.insertVersionUpgrade(versionUpgrade); | 55 | return versionUpgradeMapper.insertVersionUpgrade(versionUpgrade); |
| 61 | } | 56 | } |
| 62 | 57 |
ruoyi-admin/src/main/resources/application-druid-dev.yml
| @@ -64,9 +64,9 @@ spring: | @@ -64,9 +64,9 @@ spring: | ||
| 64 | servlet: | 64 | servlet: |
| 65 | multipart: | 65 | multipart: |
| 66 | # 单个文件大小 | 66 | # 单个文件大小 |
| 67 | - max-file-size: 10MB | 67 | + max-file-size: 100MB |
| 68 | # 设置总上传的文件大小 | 68 | # 设置总上传的文件大小 |
| 69 | - max-request-size: 20MB | 69 | + max-request-size: 100MB |
| 70 | # 服务模块 | 70 | # 服务模块 |
| 71 | devtools: | 71 | devtools: |
| 72 | restart: | 72 | restart: |
ruoyi-admin/src/main/resources/application-druid-uat.yml
| @@ -64,9 +64,9 @@ spring: | @@ -64,9 +64,9 @@ spring: | ||
| 64 | servlet: | 64 | servlet: |
| 65 | multipart: | 65 | multipart: |
| 66 | # 单个文件大小 | 66 | # 单个文件大小 |
| 67 | - max-file-size: 10MB | 67 | + max-file-size: 100MB |
| 68 | # 设置总上传的文件大小 | 68 | # 设置总上传的文件大小 |
| 69 | - max-request-size: 20MB | 69 | + max-request-size: 100MB |
| 70 | # 服务模块 | 70 | # 服务模块 |
| 71 | devtools: | 71 | devtools: |
| 72 | restart: | 72 | restart: |