|
@@ -436,8 +436,13 @@ public class SysUserServiceImpl extends JoinServiceImpl<SysUserMapper, SysUser>
|
|
|
* @param user 用户对象
|
|
|
*/
|
|
|
public void insertUserRoleUpdate(SysUserUpdate user) {
|
|
|
- Long [] arr=(Long[]) user.getRoles().stream().map(SysRole::getRoleId).toArray();
|
|
|
- this.insertUserRole(user.getId(), arr);
|
|
|
+
|
|
|
+ List<Long> collect = user.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
|
|
|
+ Long[] longArray = new Long[collect.size()];
|
|
|
+ for (int i = 0; i < collect.size(); i++) {
|
|
|
+ longArray[i] = collect.get(i);
|
|
|
+ }
|
|
|
+ this.insertUserRole(user.getId(), longArray);
|
|
|
}
|
|
|
|
|
|
|