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