|
|
@@ -16,6 +16,8 @@
|
|
|
*/
|
|
|
package com.store.goods.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.store.goods.service.IAppService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -48,9 +50,46 @@ public class AppVersionController extends BladeController {
|
|
|
|
|
|
private final IAppVersionService appVersionService;
|
|
|
|
|
|
+ private final IAppService appService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/* *//**
|
|
|
+ * 获取应用最新版本
|
|
|
+ *
|
|
|
+ * @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);
|
|
|
+ if (appVersion == null) {
|
|
|
+ return R.fail("该应用还未上传");
|
|
|
+ }
|
|
|
+ return R.data(appVersion);
|
|
|
+ }*/
|
|
|
+
|
|
|
+/* *//**
|
|
|
+ * 发布应用/取消版本
|
|
|
+ *
|
|
|
+ * @param jsonObject
|
|
|
+ * @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);
|
|
|
+ appVersionService.updateById(version);
|
|
|
+ return Result.ok();
|
|
|
+ }*/
|
|
|
/**
|
|
|
* 详情
|
|
|
- */
|
|
|
+ *//*
|
|
|
@GetMapping("/detail")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "详情", notes = "传入appVersion")
|
|
|
@@ -59,9 +98,9 @@ public class AppVersionController extends BladeController {
|
|
|
return R.data(detail);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 分页 app版本表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
@ApiOperation(value = "分页", notes = "传入appVersion")
|
|
|
@@ -70,9 +109,9 @@ public class AppVersionController extends BladeController {
|
|
|
return R.data(pages);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 自定义分页 app版本表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@GetMapping("/page")
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "分页", notes = "传入appVersion")
|
|
|
@@ -81,9 +120,9 @@ public class AppVersionController extends BladeController {
|
|
|
return R.data(pages);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 新增 app版本表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping("/save")
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "新增", notes = "传入appVersion")
|
|
|
@@ -91,9 +130,9 @@ public class AppVersionController extends BladeController {
|
|
|
return R.status(appVersionService.save(appVersion));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 修改 app版本表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping("/update")
|
|
|
@ApiOperationSupport(order = 5)
|
|
|
@ApiOperation(value = "修改", notes = "传入appVersion")
|
|
|
@@ -101,9 +140,9 @@ public class AppVersionController extends BladeController {
|
|
|
return R.status(appVersionService.updateById(appVersion));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 新增或修改 app版本表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping("/submit")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入appVersion")
|
|
|
@@ -111,16 +150,16 @@ public class AppVersionController extends BladeController {
|
|
|
return R.status(appVersionService.saveOrUpdate(appVersion));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
+
|
|
|
+ *//**
|
|
|
* 删除 app版本表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping("/remove")
|
|
|
@ApiOperationSupport(order = 8)
|
|
|
@ApiOperation(value = "删除", notes = "传入ids")
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
return R.status(appVersionService.removeByIds(Func.toLongList(ids)));
|
|
|
- }
|
|
|
+ }*/
|
|
|
+
|
|
|
|
|
|
-
|
|
|
}
|