Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
d32216d5
Commit
d32216d5
authored
Dec 21, 2019
by
Elune
Browse files
update
parent
a6e57e16
Changes
5
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DeptController.java
View file @
d32216d5
package
me.zhengjie.modules.system.rest
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.IdUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
me.zhengjie.aop.log.Log
;
...
...
@@ -11,7 +10,6 @@ import me.zhengjie.modules.system.domain.Dept;
import
me.zhengjie.modules.system.service.DeptService
;
import
me.zhengjie.modules.system.service.dto.DeptDto
;
import
me.zhengjie.modules.system.service.dto.DeptQueryCriteria
;
import
me.zhengjie.utils.RedisUtils
;
import
me.zhengjie.utils.ThrowableUtil
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java
View file @
d32216d5
...
...
@@ -61,14 +61,6 @@ public class LocalStorageController {
return
new
ResponseEntity
<>(
HttpStatus
.
NO_CONTENT
);
}
@ApiOperation
(
"删除文件"
)
@DeleteMapping
(
value
=
"/{id}"
)
@PreAuthorize
(
"@el.check('storage:del')"
)
public
ResponseEntity
<
Object
>
delete
(
@PathVariable
Long
id
){
localStorageService
.
delete
(
id
);
return
new
ResponseEntity
<>(
HttpStatus
.
OK
);
}
@Log
(
"多选删除"
)
@DeleteMapping
@ApiOperation
(
"多选删除"
)
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/PictureController.java
View file @
d32216d5
...
...
@@ -15,8 +15,6 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author 郑杰
...
...
eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java
View file @
d32216d5
...
...
@@ -51,12 +51,6 @@ public interface LocalStorageService {
*/
void
update
(
LocalStorage
resources
);
/**
* 根据ID删除
* @param id /
*/
void
delete
(
Long
id
);
/**
* 多选删除
* @param ids /
...
...
eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java
View file @
d32216d5
...
...
@@ -113,15 +113,6 @@ public class LocalStorageServiceImpl implements LocalStorageService {
localStorageRepository
.
save
(
localStorage
);
}
@Override
@CacheEvict
(
allEntries
=
true
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
delete
(
Long
id
)
{
LocalStorage
storage
=
localStorageRepository
.
findById
(
id
).
orElseGet
(
LocalStorage:
:
new
);
FileUtil
.
del
(
storage
.
getPath
());
localStorageRepository
.
delete
(
storage
);
}
@Override
@CacheEvict
(
allEntries
=
true
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment