| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CacheConstant; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | |
| | | |
| | | @Resource |
| | | private SysPermissionMapper sysPermissionMapper; |
| | | |
| | | |
| | | @Resource |
| | | private ISysPermissionDataRuleService permissionDataRuleService; |
| | | |
| | |
| | | //删除部门角色授权 |
| | | sysDepartRolePermissionMapper.deleteByMap(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据父id删除其关联的子节点数据 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public void removeChildrenBy(String parentId) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 逻辑删除 |
| | | */ |
| | |
| | | } |
| | | //---------------------------------------------------------------------- |
| | | this.updateById(sysPermission); |
| | | |
| | | |
| | | //如果当前菜单的父菜单变了,则需要修改新父菜单和老父菜单的,叶子节点状态 |
| | | String pid = sysPermission.getParentId(); |
| | | boolean flag = (oConvertUtils.isNotEmpty(pid) && !pid.equals(p.getParentId())) || oConvertUtils.isEmpty(pid)&&oConvertUtils.isNotEmpty(p.getParentId()); |
| | |
| | | this.sysPermissionMapper.setMenuLeaf(p.getParentId(), 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | query.eq(SysPermissionDataRule::getPermissionId, id); |
| | | Long countValue = this.permissionDataRuleService.count(query); |
| | | if(countValue > 0) { |
| | | this.permissionDataRuleService.remove(query); |
| | | this.permissionDataRuleService.remove(query); |
| | | } |
| | | } |
| | | |
| | |
| | | return count(qw)==0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Object addSecret(String type, String sql) { |
| | | if(type.equals("insert")){ |
| | | return baseMapper.secretOfInsert(sql); |
| | | }else if(type.equals("delete")) { |
| | | return baseMapper.secretOfDelete(sql); |
| | | }else if(type.equals("update")){ |
| | | return baseMapper.secretOfUpdate(sql); |
| | | }else { |
| | | return baseMapper.secretOfSelect(sql); |
| | | } |
| | | } |
| | | |
| | | } |