Commit b0cc652f41f00927d087ace2659035dd4cc60931
1 parent
b7e201ae
fix: 放行端口
Showing
5 changed files
with
7 additions
and
3 deletions
ruoyi-admin/src/main/java/com/ruoyi/service/AppService.java
| ... | ... | @@ -43,7 +43,7 @@ public class AppService { |
| 43 | 43 | return ApplicationResponseVo.applicationResponseVoBuild().appNoUpdate(versionNum); |
| 44 | 44 | } |
| 45 | 45 | // 更新判断 |
| 46 | - return ApplicationResponseVo.applicationResponseVoBuild().appForceUpdate(versionNum,vu.getApkUrl()); | |
| 46 | + return ApplicationResponseVo.applicationResponseVoBuild().appForceUpdate(vu.getVersionCode(),vu.getApkUrl()); | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public void downloadApk(String url, HttpServletResponse response) throws IOException { | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/upgrade/controller/VersionUpgradeController.java
| ... | ... | @@ -2,6 +2,8 @@ package com.ruoyi.upgrade.controller; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | + | |
| 6 | +import io.swagger.annotations.ApiOperation; | |
| 5 | 7 | import org.springframework.security.access.prepost.PreAuthorize; |
| 6 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | 9 | import org.springframework.web.bind.annotation.GetMapping; |
| ... | ... | @@ -52,6 +54,7 @@ public class VersionUpgradeController extends BaseController |
| 52 | 54 | @PreAuthorize("@ss.hasPermi('upgrade:upgrade:export')") |
| 53 | 55 | @Log(title = "upgrade", businessType = BusinessType.EXPORT) |
| 54 | 56 | @PostMapping("/export") |
| 57 | + @ApiOperation("") | |
| 55 | 58 | public void export(HttpServletResponse response, VersionUpgrade versionUpgrade) |
| 56 | 59 | { |
| 57 | 60 | List<VersionUpgrade> list = versionUpgradeService.selectVersionUpgradeList(versionUpgrade); | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/upgrade/service/impl/VersionUpgradeServiceImpl.java
| ... | ... | @@ -55,6 +55,7 @@ public class VersionUpgradeServiceImpl implements IVersionUpgradeService |
| 55 | 55 | public int insertVersionUpgrade(VersionUpgrade versionUpgrade) |
| 56 | 56 | { |
| 57 | 57 | versionUpgrade.setCreateTime(DateUtils.getNowDate()); |
| 58 | + versionUpgrade.setVersionCode(versionUpgrade.getVersionId() + "." + versionUpgrade.getVersionId()); | |
| 58 | 59 | return versionUpgradeMapper.insertVersionUpgrade(versionUpgrade); |
| 59 | 60 | } |
| 60 | 61 | ... | ... |
ruoyi-admin/src/main/resources/mapper/upgrade/VersionUpgradeMapper.xml
| ... | ... | @@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 42 | 42 | </select> |
| 43 | 43 | <select id="queryLatestVersionNum" resultType="com.ruoyi.upgrade.domain.VersionUpgrade"> |
| 44 | 44 | <include refid="selectVersionUpgradeVo"></include> |
| 45 | - order by create_time desc | |
| 45 | + order by version_code desc | |
| 46 | 46 | limit 1 |
| 47 | 47 | </select> |
| 48 | 48 | ... | ... |
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
| ... | ... | @@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter |
| 111 | 111 | // 过滤请求 |
| 112 | 112 | .authorizeRequests() |
| 113 | 113 | // 对于登录login 注册register 验证码captchaImage 允许匿名访问 |
| 114 | - .antMatchers("/driver/**","/in/**","/eexception/**","/equipment/**","/report/**","/login", "/register", "/captchaImage").permitAll() | |
| 114 | + .antMatchers("/app/version/check/**","/app/download","/driver/**","/in/**","/eexception/**","/equipment/**","/report/**","/login", "/register", "/captchaImage").permitAll() | |
| 115 | 115 | // 静态资源,可匿名访问 |
| 116 | 116 | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() |
| 117 | 117 | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() | ... | ... |