public async Task UpdateDataAsync(UserEditInputDTO input) { if (input.Id == GlobalData.ADMINID && _operator?.UserId != input.Id) { throw new BusException("禁止更改超级管理员!"); } await UpdateAsync(_mapper.Map <Base_User>(input)); await SetUserRoleAsync(input.Id, input.RoleIdList); await _userCache.UpdateCacheAsync(input.Id); }
public async Task AddDataAsync(UserEditInputDTO input) { await InsertAsync(_mapper.Map <Base_User>(input)); await SetUserRoleAsync(input.Id, input.RoleIdList); }