예제 #1
0
 @Transactional(readOnly = false)
 public void updatePower(SysRoleView sysrole) {
   sysrole.setCreateuser(ShiroDbRealm.getCurrentLoginName());
   for (SysFunctionView sysFunction : sysrole.getFunctions()) {
     sysFunction.setRole_function_id(IdUtils.uuid2());
   }
   SysRole sys = sysroleMapper.findOne(sysrole.getId());
   if (sys != null && !sys.getRoleName().equals(sysrole.getRoleName())) {
     sys.setRoleName(sysrole.getRoleName());
     sys.setModifyuser(ShiroDbRealm.getCurrentLoginName());
     sysroleMapper.update(sys);
   }
   sysroleMapper.deleteRoleFunction(sysrole);
   sysroleMapper.insertRoleFunction(sysrole);
 }
예제 #2
0
 @Transactional(readOnly = false)
 public void updateSysRole(SysRole sysrole) {
   sysrole.setModifyuser(ShiroDbRealm.getCurrentLoginName());
   sysroleMapper.update(sysrole);
 }