|
@@ -493,14 +493,10 @@ namespace GxPress.Service.Implement
|
|
{
|
|
{
|
|
var user = await _userRepository.GetAsync(id);
|
|
var user = await _userRepository.GetAsync(id);
|
|
if (user == null) throw new BusinessException("该用户不存在");
|
|
if (user == null) throw new BusinessException("该用户不存在");
|
|
- if (request.DepartmentId.Count() > 0)
|
|
|
|
- {
|
|
|
|
|
|
+ if (request.DepartmentId != null && request.DepartmentId.Count() > 0)
|
|
await departmentUserRepository.AddDepartmentUserAsync(request.DepartmentId, id);
|
|
await departmentUserRepository.AddDepartmentUserAsync(request.DepartmentId, id);
|
|
- }
|
|
|
|
if (!string.IsNullOrEmpty(request.DepartmentName))
|
|
if (!string.IsNullOrEmpty(request.DepartmentName))
|
|
- {
|
|
|
|
user.DepartmentName = request.DepartmentName;
|
|
user.DepartmentName = request.DepartmentName;
|
|
- }
|
|
|
|
if (!string.IsNullOrEmpty(request.Nick))
|
|
if (!string.IsNullOrEmpty(request.Nick))
|
|
user.Nick = request.Nick;
|
|
user.Nick = request.Nick;
|
|
if (!string.IsNullOrEmpty(request.Description))
|
|
if (!string.IsNullOrEmpty(request.Description))
|