Optimize UserConverter
This commit is contained in:
@@ -154,8 +154,8 @@ object UserConverter {
|
|||||||
avatar = userUpdateParam.avatar
|
avatar = userUpdateParam.avatar
|
||||||
email = userUpdateParam.email
|
email = userUpdateParam.email
|
||||||
}
|
}
|
||||||
roles = userUpdateParam.roleIds?.map { Role().apply { id = it } }
|
roles = if (userUpdateParam.id != 0L) userUpdateParam.roleIds?.map { Role().apply { id = it } } else null
|
||||||
groups = userUpdateParam.groupIds?.map { Group().apply { id = it } }
|
groups = if (userUpdateParam.id != 0L) userUpdateParam.groupIds?.map { Group().apply { id = it } } else null
|
||||||
}
|
}
|
||||||
|
|
||||||
fun userPageToUserWithRoleInfoPageVo(userPage: IPage<User>) = PageVo(
|
fun userPageToUserWithRoleInfoPageVo(userPage: IPage<User>) = PageVo(
|
||||||
|
|||||||
Reference in New Issue
Block a user