Merge remote-tracking branch 'origin/master'

This commit is contained in:
温文静WWW 2025-07-17 23:09:16 +08:00
commit 6bb01e0e27
2 changed files with 3 additions and 5 deletions

View File

@ -69,10 +69,9 @@ public class EmAreaController {
EmArea area = entityService.getById(id);
List<EmScenic> emScenics = emScenicService.findByAreaId(id);
if (null != emScenics && !emScenics.isEmpty()) {
throw new RuntimeException("机构下面还存在部门,无法删除");
throw new RuntimeException("区域下面还存在景区,无法删除");
}
area.setDelFlag(1);
entityService.updateById(area);
entityService.removeById(area.getId());
return new ResponseEntity<>(true, HttpStatus.OK);
} catch (DataIntegrityViolationException e) {
LOG.error("删除区域失败", e);

View File

@ -73,8 +73,7 @@ public class EmScenicController {
if (null != fdBaseUsers && !fdBaseUsers.isEmpty()) {
throw new RuntimeException("部门里面还存在用户,无法删除");
}
scenic.setDelFlag(1);
entityService.updateById(scenic);
entityService.removeById(scenic.getId());
return new ResponseEntity<>(HttpStatus.OK);
} catch (DataIntegrityViolationException e) {
LOG.error("删除景区失败", e);