49 lines
2.2 KiB
Java
49 lines
2.2 KiB
Java
|
package com.celnet.datadump.controller;
|
||
|
|
||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||
|
import com.celnet.datadump.entity.OrgConfig;
|
||
|
import com.celnet.datadump.global.Result;
|
||
|
import com.celnet.datadump.service.FileManagerService;
|
||
|
import io.swagger.annotations.Api;
|
||
|
import io.swagger.annotations.ApiOperation;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
@RestController
|
||
|
@Api(value = "fileManager", tags = "文件管理")
|
||
|
@RequestMapping("/fileManager")
|
||
|
public class FileManagerController {
|
||
|
@Autowired
|
||
|
private FileManagerService fileManagerService;
|
||
|
|
||
|
@GetMapping("/documentPage")
|
||
|
@ApiOperation("document page")
|
||
|
public Result documentPage(@RequestParam("isDump") Integer isDump, @RequestParam("isUpload")Integer isUpload,
|
||
|
@RequestParam(value = "Name", required = false)String Name, @RequestParam("current")Integer page,
|
||
|
@RequestParam("size")Integer pageSize) {
|
||
|
return Result.success(fileManagerService.getDocFileList(isDump, isUpload, Name, page, pageSize));
|
||
|
}
|
||
|
|
||
|
@GetMapping("/attachmentPage")
|
||
|
@ApiOperation("attachment page")
|
||
|
public Result attachmentPage(@RequestParam("isDump") Integer isDump, @RequestParam("isUpload")Integer isUpload,
|
||
|
@RequestParam(value = "Name", required = false)String Name, @RequestParam("current")Integer page,
|
||
|
@RequestParam("size")Integer pageSize) {
|
||
|
return Result.success(fileManagerService.getAttachmentFileList(isDump, isUpload, Name, page, pageSize));
|
||
|
}
|
||
|
|
||
|
@GetMapping("/dumpImg")
|
||
|
public Result dumpImg(@RequestParam("token") String token) {
|
||
|
return Result.success(fileManagerService.dumpImg(token));
|
||
|
}
|
||
|
|
||
|
@GetMapping("/uploadImg")
|
||
|
public Result uploadImg(@RequestParam("token") String token) {
|
||
|
return Result.success(fileManagerService.uploadImg(token));
|
||
|
}
|
||
|
}
|