新增待办信息
This commit is contained in:
@@ -115,6 +115,7 @@ public class BizMyfilesController extends BaseController {
|
||||
@PostMapping(value = "edit")
|
||||
@ResponseBody
|
||||
public String edit(@Validated BizMyfiles bizMyfiles) {
|
||||
bizMyfiles.setUpdateTime(new Date());
|
||||
bizMyfilesService.update(bizMyfiles);
|
||||
return renderResult(Global.TRUE, text("修改文件名称成功!"));
|
||||
}
|
||||
@@ -179,6 +180,9 @@ public class BizMyfilesController extends BaseController {
|
||||
public void downloadFile(BizMyfiles bizMyfiles, HttpServletResponse response) {
|
||||
try {
|
||||
BizMyfiles myfiles = bizMyfilesService.get(bizMyfiles);
|
||||
myfiles.setUpdateTime(new Date());
|
||||
myfiles.setDownloadCount(myfiles.getDownloadCount() + 1);
|
||||
bizMyfilesService.update(bizMyfiles);
|
||||
FileDownloadUtils.downloadFile(myfiles.getFilePath(), MyFileUtils.getFileName(myfiles.getFileName(), myfiles.getFileExt()), response);
|
||||
} catch (Exception e) {
|
||||
System.out.print(e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user