package com.ruoyi.other.controller;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.framework.web.domain.R;
|
import com.ruoyi.other.pojo.PdaVersion;
|
import com.ruoyi.other.service.PdaVersionService;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.multipart.MultipartFile;
|
|
@RestController
|
@RequestMapping("/app")
|
@AllArgsConstructor
|
public class PdaVersionController {
|
|
private PdaVersionService pdaVersionService;
|
|
@ApiOperation("查询所有版本")
|
@GetMapping("/getAllVersion")
|
public R getAllVersion(Page<PdaVersion> page, PdaVersion pdaVersion) {
|
return R.ok(pdaVersionService.getAllVersion(page, pdaVersion));
|
}
|
|
@ApiOperation("上传apk")
|
@PostMapping("/uploadApk")
|
public R uploadApk(@RequestParam("file") MultipartFile file, String name, String version) {
|
return R.ok(pdaVersionService.uploadApk(file, name, version));
|
}
|
|
}
|