公共文件上传状态记录
This commit is contained in:
parent
eeff34622c
commit
a41da06151
@ -23,7 +23,7 @@ public class FileUtil {
|
|||||||
// in.transferTo(0, in.size(), out);
|
// in.transferTo(0, in.size(), out);
|
||||||
// OutputStream osm = new FileOutputStream(outPath);
|
// OutputStream osm = new FileOutputStream(outPath);
|
||||||
// IOUtils.copy(in, osm);
|
// IOUtils.copy(in, osm);
|
||||||
// System.out.println("saveFile"+in+" "+outPath);
|
System.out.println("saveFile"+in+" "+outPath);
|
||||||
try (OutputStream osm = new FileOutputStream(outPath)) {
|
try (OutputStream osm = new FileOutputStream(outPath)) {
|
||||||
IOUtils.copy(in, osm);
|
IOUtils.copy(in, osm);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ public class onlyofController {
|
|||||||
@Operation(summary = "获取文件列表")
|
@Operation(summary = "获取文件列表")
|
||||||
@PreAuthorize("@ss.hasPermission('only:onlyof:filelist')")
|
@PreAuthorize("@ss.hasPermission('only:onlyof:filelist')")
|
||||||
public ResponseEntity<Object> listFile() {
|
public ResponseEntity<Object> listFile() {
|
||||||
// System.out.println("fileList");
|
System.out.println("fileList");
|
||||||
return new ResponseEntity<Object>(uploadService.list(), HttpStatus.OK);
|
return new ResponseEntity<Object>(uploadService.list(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,6 +112,7 @@ public class onlyofController {
|
|||||||
@Operation(summary = "更新文件编辑")
|
@Operation(summary = "更新文件编辑")
|
||||||
@PreAuthorize("@ss.hasPermission('only:onlyof:update')")
|
@PreAuthorize("@ss.hasPermission('only:onlyof:update')")
|
||||||
public ResponseEntity<Object> upload(@RequestParam("file") MultipartFile file,HttpServletRequest request) throws Exception {
|
public ResponseEntity<Object> upload(@RequestParam("file") MultipartFile file,HttpServletRequest request) throws Exception {
|
||||||
|
System.out.println("update");
|
||||||
if (file.isEmpty()){
|
if (file.isEmpty()){
|
||||||
throw new Exception("上传文件不能为空");
|
throw new Exception("上传文件不能为空");
|
||||||
}
|
}
|
||||||
@ -160,6 +161,7 @@ public class onlyofController {
|
|||||||
@Operation(summary = "编辑文件")
|
@Operation(summary = "编辑文件")
|
||||||
@PreAuthorize("@ss.hasPermission('only:onlyof:edit')")
|
@PreAuthorize("@ss.hasPermission('only:onlyof:edit')")
|
||||||
public ModelAndView editDocFile(@RequestParam String name, String userName, String userId ,String token, Model model) {
|
public ModelAndView editDocFile(@RequestParam String name, String userName, String userId ,String token, Model model) {
|
||||||
|
System.out.println("edit");
|
||||||
// System.out.println("token"+token);
|
// System.out.println("token"+token);
|
||||||
String path = filePath+name;
|
String path = filePath+name;
|
||||||
// System.out.println("path:"+path);
|
// System.out.println("path:"+path);
|
||||||
@ -186,7 +188,7 @@ public class onlyofController {
|
|||||||
@Operation(summary = "回调文件")
|
@Operation(summary = "回调文件")
|
||||||
@PreAuthorize("@ss.hasPermission('only:onlyof:callback')")
|
@PreAuthorize("@ss.hasPermission('only:onlyof:callback')")
|
||||||
public void saveDocumentFile(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
public void saveDocumentFile(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
// System.out.println("callback");
|
System.out.println("callback");
|
||||||
//处理编辑回调逻辑
|
//处理编辑回调逻辑
|
||||||
callBack(request, response);
|
callBack(request, response);
|
||||||
|
|
||||||
@ -202,7 +204,7 @@ public class onlyofController {
|
|||||||
@Operation(summary = "文件状态")
|
@Operation(summary = "文件状态")
|
||||||
@PreAuthorize("@ss.hasPermission('only:onlyof:editStatus')")
|
@PreAuthorize("@ss.hasPermission('only:onlyof:editStatus')")
|
||||||
public ResponseEntity<Object> getDoucmentEditStatus(String name) throws ParseException {
|
public ResponseEntity<Object> getDoucmentEditStatus(String name) throws ParseException {
|
||||||
// System.out.println("editStatus");
|
System.out.println("editStatus");
|
||||||
String url = officeUrl+officeCommand;
|
String url = officeUrl+officeCommand;
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
map.put("c", "forcesave");
|
map.put("c", "forcesave");
|
||||||
|
Loading…
Reference in New Issue
Block a user