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 | 28 | */ |
| 29 | 29 | @GetMapping("/version/check/{currentVersion}") |
| 30 | 30 | @ApiOperation("校验版本号") |
| 31 | - public AjaxResult checkVersionNum(@PathVariable("currentVersion") String currentVersion) { | |
| 31 | + public AjaxResult checkVersionNum(@PathVariable("currentVersion") Integer currentVersion) { | |
| 32 | 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 | 15 | @ApiModelProperty("是否强制更新") |
| 16 | 16 | Boolean forceUpdate; |
| 17 | 17 | @ApiModelProperty("更新版本号") |
| 18 | - String versionNum; | |
| 18 | + Integer versionNum; | |
| 19 | 19 | @ApiModelProperty("更新apk的url") |
| 20 | 20 | String apkUrl; |
| 21 | 21 | private ApplicationResponseVo(){ } |
| 22 | - public ApplicationResponseVo appNoUpdate(String versionNum){ | |
| 22 | + public ApplicationResponseVo appNoUpdate(Integer versionNum){ | |
| 23 | 23 | this.updateFlag = false; |
| 24 | 24 | this.forceUpdate = false; |
| 25 | 25 | this.versionNum = versionNum; |
| ... | ... | @@ -33,7 +33,7 @@ public class ApplicationResponseVo { |
| 33 | 33 | * @param apkUrl |
| 34 | 34 | * @return |
| 35 | 35 | */ |
| 36 | - public ApplicationResponseVo appNormalUpdate(String versionNum,String apkUrl){ | |
| 36 | + public ApplicationResponseVo appNormalUpdate(Integer versionNum,String apkUrl){ | |
| 37 | 37 | this.updateFlag = true; |
| 38 | 38 | this.forceUpdate = false; |
| 39 | 39 | this.versionNum = versionNum; |
| ... | ... | @@ -47,7 +47,7 @@ public class ApplicationResponseVo { |
| 47 | 47 | * @param apkUrl |
| 48 | 48 | * @return |
| 49 | 49 | */ |
| 50 | - public ApplicationResponseVo appForceUpdate(String versionNum,String apkUrl){ | |
| 50 | + public ApplicationResponseVo appForceUpdate(Integer versionNum,String apkUrl){ | |
| 51 | 51 | this.updateFlag = true; |
| 52 | 52 | this.forceUpdate = true; |
| 53 | 53 | this.versionNum = versionNum; | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/service/AppService.java
| ... | ... | @@ -34,7 +34,7 @@ public class AppService { |
| 34 | 34 | @Autowired |
| 35 | 35 | private VersionUpgradeMapper versionUpgradeMapper; |
| 36 | 36 | |
| 37 | - public ApplicationResponseVo checkVersionNum(String versionNum) { | |
| 37 | + public ApplicationResponseVo checkVersionNum(Integer versionNum) { | |
| 38 | 38 | // 比对版本 需要更新 判断是否需要强制更新 |
| 39 | 39 | VersionUpgrade vu = versionUpgradeMapper.queryLatestVersionNum(); |
| 40 | 40 | // 无需更新 | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/upgrade/domain/VersionUpgrade.java
ruoyi-admin/src/main/java/com/ruoyi/upgrade/service/impl/VersionUpgradeServiceImpl.java
| ... | ... | @@ -52,11 +52,6 @@ public class VersionUpgradeServiceImpl implements IVersionUpgradeService { |
| 52 | 52 | @Override |
| 53 | 53 | public int insertVersionUpgrade(VersionUpgrade versionUpgrade) { |
| 54 | 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 | 55 | return versionUpgradeMapper.insertVersionUpgrade(versionUpgrade); |
| 61 | 56 | } |
| 62 | 57 | ... | ... |
ruoyi-admin/src/main/resources/application-druid-dev.yml
ruoyi-admin/src/main/resources/application-druid-uat.yml