Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6bb01e0e27
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user