Java Code Examples for org.jeecg.modules.system.entity.SysPermission#setRuleFlag()
The following examples show how to use
org.jeecg.modules.system.entity.SysPermission#setRuleFlag() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysPermissionDataRuleImpl.java From jeecg-cloud with Apache License 2.0 | 6 votes |
@Override @Transactional public void deletePermissionDataRule(String dataRuleId) { SysPermissionDataRule dataRule = this.baseMapper.selectById(dataRuleId); if(dataRule!=null) { this.removeById(dataRuleId); Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<SysPermissionDataRule>().eq(SysPermissionDataRule::getPermissionId, dataRule.getPermissionId())); //注:同一个事务中删除后再查询是会认为数据已被删除的 若事务回滚上述删除无效 if(count==null || count==0) { SysPermission permission = sysPermissionMapper.selectById(dataRule.getPermissionId()); if(permission!=null && permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_1)) { permission.setRuleFlag(CommonConstant.RULE_FLAG_0); sysPermissionMapper.updateById(permission); } } } }
Example 2
Source File: SysPermissionDataRuleImpl.java From jeecg-boot-with-activiti with MIT License | 6 votes |
@Override @Transactional public void deletePermissionDataRule(String dataRuleId) { SysPermissionDataRule dataRule = this.baseMapper.selectById(dataRuleId); if(dataRule!=null) { this.removeById(dataRuleId); Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<SysPermissionDataRule>().eq(SysPermissionDataRule::getPermissionId, dataRule.getPermissionId())); //注:同一个事务中删除后再查询是会认为数据已被删除的 若事务回滚上述删除无效 if(count==null || count==0) { SysPermission permission = sysPermissionMapper.selectById(dataRule.getPermissionId()); if(permission!=null && permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_1)) { permission.setRuleFlag(CommonConstant.RULE_FLAG_0); sysPermissionMapper.updateById(permission); } } } }
Example 3
Source File: SysPermissionDataRuleImpl.java From teaching with Apache License 2.0 | 6 votes |
@Override @Transactional public void deletePermissionDataRule(String dataRuleId) { SysPermissionDataRule dataRule = this.baseMapper.selectById(dataRuleId); if(dataRule!=null) { this.removeById(dataRuleId); Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<SysPermissionDataRule>().eq(SysPermissionDataRule::getPermissionId, dataRule.getPermissionId())); //注:同一个事务中删除后再查询是会认为数据已被删除的 若事务回滚上述删除无效 if(count==null || count==0) { SysPermission permission = sysPermissionMapper.selectById(dataRule.getPermissionId()); if(permission!=null && permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_1)) { permission.setRuleFlag(CommonConstant.RULE_FLAG_0); sysPermissionMapper.updateById(permission); } } } }
Example 4
Source File: SysPermissionDataRuleImpl.java From jeecg-boot with Apache License 2.0 | 6 votes |
@Override @Transactional public void deletePermissionDataRule(String dataRuleId) { SysPermissionDataRule dataRule = this.baseMapper.selectById(dataRuleId); if(dataRule!=null) { this.removeById(dataRuleId); Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<SysPermissionDataRule>().eq(SysPermissionDataRule::getPermissionId, dataRule.getPermissionId())); //注:同一个事务中删除后再查询是会认为数据已被删除的 若事务回滚上述删除无效 if(count==null || count==0) { SysPermission permission = sysPermissionMapper.selectById(dataRule.getPermissionId()); if(permission!=null && permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_1)) { permission.setRuleFlag(CommonConstant.RULE_FLAG_0); sysPermissionMapper.updateById(permission); } } } }
Example 5
Source File: SysPermissionDataRuleImpl.java From jeecg-cloud with Apache License 2.0 | 5 votes |
@Override @Transactional public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule) { this.save(sysPermissionDataRule); SysPermission permission = sysPermissionMapper.selectById(sysPermissionDataRule.getPermissionId()); if(permission!=null && (permission.getRuleFlag()==null || permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_0))) { permission.setRuleFlag(CommonConstant.RULE_FLAG_1); sysPermissionMapper.updateById(permission); } }
Example 6
Source File: SysPermissionDataRuleImpl.java From jeecg-boot-with-activiti with MIT License | 5 votes |
@Override @Transactional public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule) { this.save(sysPermissionDataRule); SysPermission permission = sysPermissionMapper.selectById(sysPermissionDataRule.getPermissionId()); if(permission!=null && (permission.getRuleFlag()==null || permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_0))) { permission.setRuleFlag(CommonConstant.RULE_FLAG_1); sysPermissionMapper.updateById(permission); } }
Example 7
Source File: SysPermissionDataRuleImpl.java From teaching with Apache License 2.0 | 5 votes |
@Override @Transactional public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule) { this.save(sysPermissionDataRule); SysPermission permission = sysPermissionMapper.selectById(sysPermissionDataRule.getPermissionId()); if(permission!=null && (permission.getRuleFlag()==null || permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_0))) { permission.setRuleFlag(CommonConstant.RULE_FLAG_1); sysPermissionMapper.updateById(permission); } }
Example 8
Source File: SysPermissionDataRuleImpl.java From jeecg-boot with Apache License 2.0 | 5 votes |
@Override @Transactional public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule) { this.save(sysPermissionDataRule); SysPermission permission = sysPermissionMapper.selectById(sysPermissionDataRule.getPermissionId()); if(permission!=null && (permission.getRuleFlag()==null || permission.getRuleFlag().equals(CommonConstant.RULE_FLAG_0))) { permission.setRuleFlag(CommonConstant.RULE_FLAG_1); sysPermissionMapper.updateById(permission); } }