update 取消下载次数限制
This commit is contained in:
+6
-6
@@ -323,12 +323,12 @@ public class CommonController {
|
||||
|
||||
ossFileService.updateById(ossFile);
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (loginUser.getIsCompanyUser()) {
|
||||
Integer integer = ossFileService.searchDownloadTimes(ossFile.getId(), loginUser.getId());
|
||||
if (integer >= 5) {
|
||||
throw new JeroBootException("超出下载次数限制");
|
||||
}
|
||||
}
|
||||
//if (loginUser.getIsCompanyUser()) {
|
||||
// Integer integer = ossFileService.searchDownloadTimes(ossFile.getId(), loginUser.getId());
|
||||
// if (integer >= 5) {
|
||||
// throw new JeroBootException("超出下载次数限制");
|
||||
// }
|
||||
//}
|
||||
ossFileService.saveDownloadTimes(ossFile.getId(), loginUser.getId());
|
||||
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
|
||||
Reference in New Issue
Block a user