das接口修改
This commit is contained in:
parent
2915bfe96c
commit
dcbb1e9dc6
@ -107,10 +107,9 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
List<Long> errorRole = new ArrayList<>();
|
||||
for (String strRoleId : roles) {
|
||||
if (StringUtils.hasText(strRoleId)) {
|
||||
long roleId=Long.getLong(strRoleId);
|
||||
long roleCount = sysRoleMapper.existRoleByRoleId(roleId);
|
||||
long roleCount = sysRoleMapper.existRoleByRoleId(Long.valueOf(strRoleId));
|
||||
if (roleCount == 0) {
|
||||
errorRole.add(roleId);
|
||||
errorRole.add(Long.valueOf(strRoleId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -162,10 +161,9 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
sysUserRoleMapper.delete(accountRoleQueryWrapper);
|
||||
//绑定角色
|
||||
for (String strRoleId : sysUserDto.getRoleList()) {
|
||||
long roleId = Long.getLong(strRoleId);
|
||||
SysUserRole accountRole = new SysUserRole();
|
||||
accountRole.setUserId(sysUser.getId());
|
||||
accountRole.setRoleId(roleId);
|
||||
accountRole.setRoleId(Long.valueOf(strRoleId));
|
||||
accountRole.setRevision(1);
|
||||
accountRole.setCreatedTime(new Date());
|
||||
accountRole.setUpdatedTime(new Date());
|
||||
|
Loading…
Reference in New Issue
Block a user