|
|
@@ -54,39 +54,41 @@ public class AppVersionController extends BladeController {
|
|
|
|
|
|
|
|
|
|
|
|
-/* *//**
|
|
|
- * 获取应用最新版本
|
|
|
- *
|
|
|
- * @param packageName
|
|
|
- * @return
|
|
|
- *//*
|
|
|
+ /**
|
|
|
+ * 通过包名-获取应用最新版本
|
|
|
+ * */
|
|
|
@GetMapping("/getLatestVersion")
|
|
|
- public R<AppVersion> getLatestVersion(@RequestParam String packageName, @RequestParam(required = false, name = "type", defaultValue = "0") Integer type) {
|
|
|
- AppVersion appVersion = appService.getLatestVersionById(packageName, new Integer[]{1}, type);
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "通过包名-获取应用最新版本", notes = " ")
|
|
|
+ public R<AppVersion> getLatestVersion(@ApiParam(value = "当前app包名,必填", required = true)@RequestParam String packageName,
|
|
|
+ @RequestParam(required = false, name = "type", defaultValue = "0") Integer type)
|
|
|
+ {
|
|
|
+ AppVersion appVersion = appService.getLatestVersion(packageName, new Integer[]{1}, type);
|
|
|
if (appVersion == null) {
|
|
|
return R.fail("该应用还未上传");
|
|
|
}
|
|
|
return R.data(appVersion);
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
-/* *//**
|
|
|
+ /**
|
|
|
* 发布应用/取消版本
|
|
|
*
|
|
|
- * @param jsonObject
|
|
|
+ * @param
|
|
|
* @return
|
|
|
- *//*
|
|
|
+ */
|
|
|
@PutMapping("/versionRelease")
|
|
|
- public Result<SysAppVersion> release(@RequestBody JSONObject jsonObject) {
|
|
|
- String appVersionId = jsonObject.getString("appVersionId");
|
|
|
- Boolean isRelease = jsonObject.getBoolean("isRelease");
|
|
|
- if (oConvertUtils.isEmpty(appVersionId) || oConvertUtils.isEmpty(isRelease)) {
|
|
|
- return Result.error("参数异常,请检查参数");
|
|
|
- }
|
|
|
- SysAppVersion version = appVersionService.getExistById(appVersionId);
|
|
|
- version.setIsRelease(isRelease ? 1 : 0);
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "发布/取消app应用版本", notes = "传入AppVersion")
|
|
|
+ public R release(@RequestBody AppVersion appVersion) {
|
|
|
+ Long appVersionId = appVersion.getId();
|
|
|
+ AppVersion version = appVersionService.getById(appVersionId);
|
|
|
+ version.setIsRelease(version.getIsRelease()==0 ? 1 : 0);
|
|
|
appVersionService.updateById(version);
|
|
|
- return Result.ok();
|
|
|
- }*/
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 详情
|
|
|
*//*
|