mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
fix: 接口需要禁止删除组织 Organizations#ROOT_ORG_ID 否则会导致同步器工作异常
This commit is contained in:
parent
5b15439393
commit
a096b390a2
@ -137,6 +137,9 @@ public class OrganizationsController {
|
|||||||
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
public Message<?> delete(@RequestParam("ids") List<String> ids,@CurrentUser UserInfo currentUser) {
|
||||||
logger.debug("-delete ids : {} " , ids);
|
logger.debug("-delete ids : {} " , ids);
|
||||||
|
if (ids != null && ids.contains(Organizations.ROOT_ORG_ID)) {
|
||||||
|
return new Message<Organizations>(Message.FAIL, "根组织不允许删除");
|
||||||
|
}
|
||||||
if (organizationsService.deleteBatch(ids)) {
|
if (organizationsService.deleteBatch(ids)) {
|
||||||
systemLog.insert(
|
systemLog.insert(
|
||||||
ConstsEntryType.ORGANIZATION,
|
ConstsEntryType.ORGANIZATION,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user