|
|
@@ -12,6 +12,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -53,8 +54,8 @@ public class XcrFileController extends BaseController {
|
|
|
@PostMapping("/save")
|
|
|
@ApiOperation(value = "文件管理新增")
|
|
|
@Log(title = "新增文件管理", businessType = BusinessType.INSERT)
|
|
|
- public boolean save(@RequestBody XcrFile crmFile) {
|
|
|
- return service.save(crmFile);
|
|
|
+ public boolean save(XcrFile crmFile,@RequestParam("file") MultipartFile file) {
|
|
|
+ return service.saveMinio(crmFile,file);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -63,8 +64,18 @@ public class XcrFileController extends BaseController {
|
|
|
@PostMapping("/updateById")
|
|
|
@ApiOperation(value = "文件管理修改")
|
|
|
@Log(title = "修改文件管理", businessType = BusinessType.UPDATE)
|
|
|
- public boolean updateById(@RequestBody XcrFile crmFile) {
|
|
|
- return service.updateById(crmFile);
|
|
|
+ public boolean updateById(@RequestBody XcrFile crmFile,MultipartFile multipartFile) {
|
|
|
+ return service.updateMinio(crmFile,multipartFile);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除文件管理
|
|
|
+ */
|
|
|
+ @GetMapping("/deleteFile")
|
|
|
+ @ApiOperation(value = "文件管理删除")
|
|
|
+ @Log(title = "删除文件管理", businessType = BusinessType.DELETE)
|
|
|
+ public boolean deleteFile(@PathVariable String id) {
|
|
|
+ return service.deleteFile(id);
|
|
|
}
|
|
|
|
|
|
}
|