|
|
@@ -79,24 +79,24 @@ public class AppVersionController extends BaseController {
|
|
|
|
|
|
@GetMapping("/checkIosReview")
|
|
|
public AppVersion checkIosReview(@RequestParam String version) {
|
|
|
- return appVersionRepo.findByPlatformAndVersion("iOS", version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
+ return appVersionRepo.findByPlatformAndVersionAndDelFalse("iOS", version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/checkAndroidReview")
|
|
|
public AppVersion checkAndroidReview(@RequestParam String version) {
|
|
|
- return appVersionRepo.findByPlatformAndVersion("Android", version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
+ return appVersionRepo.findByPlatformAndVersionAndDelFalse("Android", version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/getVersion")
|
|
|
public AppVersion checkReview(@RequestParam String platform, @RequestParam String version) {
|
|
|
- return appVersionRepo.findByPlatformAndVersion(platform, version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
+ return appVersionRepo.findByPlatformAndVersionAndDelFalse(platform, version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/checkUpdate")
|
|
|
@Cacheable(value = "checkUpdate", key = "#platform+'@'+#version")
|
|
|
public Map<String, Object> checkUpdate(@RequestParam String platform, @RequestParam String version) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- AppVersion appVersion = appVersionRepo.findFirstByPlatformAndReviewFalseOrderByVersionNumDesc(platform)
|
|
|
+ AppVersion appVersion = appVersionRepo.findFirstByPlatformAndReviewFalseAndDelFalseOrderByVersionNumDesc(platform)
|
|
|
.orElseThrow(new BusinessException("版本不存在"));
|
|
|
map.put("version", appVersion);
|
|
|
|