[go: up one dir, main page]

Skip to content

Commit

Permalink
增加删除权限
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Aug 27, 2019
1 parent 0cf4be6 commit bb7fb90
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,21 @@ public void mergeSetting(List<AuthorizationSettingEntity> settings) {
if (!CollectionUtils.isEmpty(setting.getDetails())) {
for (AuthorizationSettingDetailEntity detail : setting.getDetails()) {
detail.setSettingId(setting.getId());
//删除权限信息
if (Byte.valueOf((byte) -100).equals(detail.getStatus())) {
DefaultDSLDeleteService.createDelete(authorizationSettingDetailDao)
.where(detail::getSettingId)
.and(detail::getPermissionId)
.exec();
continue;
}
int i = DefaultDSLUpdateService
.createUpdate(authorizationSettingDetailDao, detail)
.where(detail::getSettingId)
.and(detail::getPermissionId)
.exec();
if (i == 0) {
detail.setStatus(STATUS_ENABLED);
detail.setId(IDGenerator.MD5.generate());
authorizationSettingDetailDao.insert(detail);
}
Expand Down

0 comments on commit bb7fb90

Please sign in to comment.