public async Task <UserInfo> AddOrModifyUserInfoAsync(AddOrModifyUserInfo model, string sOperator)
        {
            UserInfo entityUserInfo;

            if (model.Id == 0)
            {
                entityUserInfo = _mapper.Map <UserInfo>(model);
                //加密  使用默认密码
                entityUserInfo.SloginPwd = EncryptHelper.EncryptPasswordMd5(EncryptHelper.Encode(entityUserInfo.SloginPwd, EncryptHelper.AesEncryptKeys));
                await _userInfoRepository.AppendAsync(entityUserInfo, sOperator);
            }
            else
            {
                entityUserInfo = await _userInfoRepository.SelectAsync(model.Id);

                if (entityUserInfo != null)
                {
                    model.SloginPwd = entityUserInfo.SloginPwd;
                    _mapper.Map(model, entityUserInfo);
                    _userInfoRepository.Update(entityUserInfo, sOperator);
                }
            }
            await _userRoleService.AddOrDeleteUserRoleAsync(entityUserInfo.Id, model.lstRoleId, sOperator);

            return(entityUserInfo);
        }