|
@@ -68,7 +68,7 @@ public class AppVersionController extends BaseController {
|
|
|
@PreAuthorize("hasRole('ADMIN')")
|
|
@PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/del/{id}")
|
|
@PostMapping("/del/{id}")
|
|
|
public void del(@PathVariable Long id) {
|
|
public void del(@PathVariable Long id) {
|
|
|
- appVersionRepo.softDelete(id);
|
|
|
|
|
|
|
+ appVersionRepo.deleteById(id);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/excel")
|
|
@GetMapping("/excel")
|
|
@@ -80,17 +80,18 @@ public class AppVersionController extends BaseController {
|
|
|
|
|
|
|
|
@GetMapping("/checkIosReview")
|
|
@GetMapping("/checkIosReview")
|
|
|
public AppVersion checkIosReview(@RequestParam String version) {
|
|
public AppVersion checkIosReview(@RequestParam String version) {
|
|
|
- return appVersionRepo.findByPlatformAndVersionAndDelFalse("iOS", version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
|
|
|
|
+ return appVersionRepo.findByPlatformAndVersionAndChannelAndDelFalse("iOS", version, "default").orElseThrow(new BusinessException("版本不存在"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/checkAndroidReview")
|
|
@GetMapping("/checkAndroidReview")
|
|
|
public AppVersion checkAndroidReview(@RequestParam String version) {
|
|
public AppVersion checkAndroidReview(@RequestParam String version) {
|
|
|
- return appVersionRepo.findByPlatformAndVersionAndDelFalse("Android", version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
|
|
|
|
+ return appVersionRepo.findByPlatformAndVersionAndChannelAndDelFalse("Android", version, "default").orElseThrow(new BusinessException("版本不存在"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/getVersion")
|
|
@GetMapping("/getVersion")
|
|
|
- public AppVersion checkReview(@RequestParam String platform, @RequestParam String version) {
|
|
|
|
|
- return appVersionRepo.findByPlatformAndVersionAndDelFalse(platform, version).orElseThrow(new BusinessException("版本不存在"));
|
|
|
|
|
|
|
+ public AppVersion checkReview(@RequestParam String platform, @RequestParam String version,
|
|
|
|
|
+ @RequestParam(defaultValue = "default") String channel) {
|
|
|
|
|
+ return appVersionRepo.findByPlatformAndVersionAndChannelAndDelFalse(platform, version, channel).orElseThrow(new BusinessException("版本不存在"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/checkUpdate")
|
|
@GetMapping("/checkUpdate")
|