【新增】官网获取最新APP接口

This commit is contained in:
MichaelWin
2026-01-22 17:09:12 +08:00
parent dffa3ea84a
commit 8a0032cfa4
2 changed files with 32 additions and 1 deletions

View File

@@ -52,7 +52,8 @@ public class SaTokenConfig implements WebMvcConfigurer {
// 排除错误页面 // 排除错误页面
.excludePathPatterns("/error", "/error/**") .excludePathPatterns("/error", "/error/**")
// 排除校验更新接口 // 排除校验更新接口
.excludePathPatterns("app_version", "/app_version/checkUpdate") .excludePathPatterns("/app_version", "/app_version/checkUpdate")
.excludePathPatterns("/api/app", "/api/app/getAppVersion")
// 排除模型接口 // 排除模型接口
.excludePathPatterns("/model/page", "/model/list", "/model/detail/**", "/model/category/**") .excludePathPatterns("/model/page", "/model/list", "/model/detail/**", "/model/category/**")
// 排除咨询接口 // 排除咨询接口

View File

@@ -0,0 +1,30 @@
package com.corewing.app.modules.website;
import com.corewing.app.common.Result;
import com.corewing.app.entity.AppVersion;
import com.corewing.app.service.AppVersionService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 获取最新的APP版本
*/
@Api("最新APP版本")
@RestController
@RequestMapping("/api/app")
public class AppVersionWebsiteController {
@Resource
private AppVersionService appVersionService;
@GetMapping("/getAppVersion")
public Result<AppVersion> getAppVersion() {
return Result.success(appVersionService.getAppVersion());
}
}