|
|
@@ -1,12 +1,10 @@
|
|
|
package shop.alien.store.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import shop.alien.entity.result.R;
|
|
|
import shop.alien.entity.store.StoreAppVersion;
|
|
|
import shop.alien.store.service.StoreAppVersionService;
|
|
|
@@ -36,4 +34,22 @@ public class StoreAppVersionController {
|
|
|
return R.data(storeAppVersionService.getLatestVersion(appType));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("保存或修改版本信息")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @PostMapping("/saveVersionInfo")
|
|
|
+ public R<StoreAppVersion> saveVersionInfo(@RequestBody StoreAppVersion storeAppVersion) {
|
|
|
+ return storeAppVersionService.saveVersionInfo(storeAppVersion) ? R.success("成功") : R.fail("失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("列表分页查询")
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "appType", value = "app类型: 1:用户端, 2:商家端", dataType = "Integer", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "条数", dataType = "Integer", paramType = "query", required = true, defaultValue = "10"),
|
|
|
+ @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "Integer", paramType = "query", required = true, defaultValue = "1")
|
|
|
+ })
|
|
|
+ @GetMapping("/getList")
|
|
|
+ public R<IPage<StoreAppVersion>> getList(Integer appType, Integer pageSize, Integer pageNum) {
|
|
|
+ return R.data(storeAppVersionService.getList(appType, pageSize, pageNum));
|
|
|
+ }
|
|
|
}
|