| | |
| | | |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.C; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.xinquan.common.core.domain.R; |
| | | import com.xinquan.common.core.utils.page.PageDTO; |
| | |
| | | @Autowired |
| | | private RemoteAppUserService remoteAppUserService; |
| | | @GetMapping("/detailVersionApp") |
| | | @ApiOperation(value = "查看详情版本管理", tags = "安卓版本管理") |
| | | @ApiOperation(value = "获取最新安卓安装包", tags = "2.0新增 安卓版本管理") |
| | | public R<Version> detailVersionApp() { |
| | | List<Version> list = versionService.lambdaQuery().orderByDesc(BaseModel::getCreateTime).list(); |
| | | List<Version> list = versionService.lambdaQuery().isNotNull(Version::getAndroidFile).orderByDesc(BaseModel::getCreateTime).list(); |
| | | if (!list.isEmpty()){ |
| | | return R.ok(list.get(0)); |
| | | } |
| | | return R.ok(); |
| | | return R.ok(new Version()); |
| | | } |
| | | @GetMapping("/detailVersionAppIos") |
| | | @ApiOperation(value = "获取最新ios安装包", tags = "2.0新增 ios版本管理") |
| | | public R<Version> detailVersionAppIos() { |
| | | List<Version> list = versionService.lambdaQuery().isNotNull(Version::getIosFile).orderByDesc(BaseModel::getCreateTime).list(); |
| | | if (!list.isEmpty()){ |
| | | return R.ok(list.get(0)); |
| | | } |
| | | return R.ok(new Version()); |
| | | } |
| | | @GetMapping("/versionList") |
| | | @ApiOperation(value = "版本管理列表-分页", tags = {"管理后台-版本管理"}) |
| | |
| | | noticeRecord.setContent("APP已更新至【"+homeBackgroundMusic.getVersionNo()+"】版本,请及时更新!"); |
| | | remoteAppUserService.addNoticeReplay(noticeRecord); |
| | | } |
| | | List<Version> list = versionService.list(new LambdaQueryWrapper<Version>() |
| | | .eq(Version::getVersionNo, homeBackgroundMusic.getVersionNo())); |
| | | if (!list.isEmpty())return R.fail("版本号不可重复"); |
| | | return R.ok(versionService.save(homeBackgroundMusic)); |
| | | } |
| | | @GetMapping("/detailVersion") |
| | |
| | | @Log(title = "【版本管理】修改", businessType = BusinessType.UPDATE) |
| | | |
| | | public R updateVersion(@RequestBody Version homeBackgroundMusic) { |
| | | List<Version> list = versionService.list(new LambdaQueryWrapper<Version>() |
| | | .eq(Version::getVersionNo, homeBackgroundMusic.getVersionNo()) |
| | | .ne(Version::getId,homeBackgroundMusic.getId()) |
| | | ); |
| | | if (!list.isEmpty())return R.fail("版本号不可重复"); |
| | | homeBackgroundMusic.setUpdateBy(SecurityUtils.getUsername()); |
| | | homeBackgroundMusic.setUpdateTime(LocalDateTime.now()); |
| | | return R.ok(versionService.updateById(homeBackgroundMusic)); |