diff --git a/src/Znyc.Dispatching.Application/User/Services/UserService.cs b/src/Znyc.Dispatching.Application/User/Services/UserService.cs index d00b0bb..a276fc3 100644 --- a/src/Znyc.Dispatching.Application/User/Services/UserService.cs +++ b/src/Znyc.Dispatching.Application/User/Services/UserService.cs @@ -175,6 +175,7 @@ namespace Znyc.Dispatching.Application { throw Oops.Bah("公司已被停用,请联系管理员"); } + if (input.RoleId.Equals("")) throw Oops.Bah("请从邀请链接进入"); var user = await _repository.FirstOrDefaultAsync(x => x.OpenId == jsCode2JsonResult.openid); var employee = new Employee(); if (user.IsNull()) @@ -200,27 +201,7 @@ namespace Znyc.Dispatching.Application phone = phoneInfo.PurePhoneNumber; Console.WriteLine(phoneInfo.PurePhoneNumber); - //var decryptor = rijndael.CreateDecryptor(key, iv); - - //using (var msDecrypt = new MemoryStream(encryptedData)) - //{ - // using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)) - // { - // Console.WriteLine("csDecrypt:"+ csDecrypt); - // using (var srDecrypt = new StreamReader(csDecrypt)) - // { - // var plaintext = srDecrypt.ReadToEnd(); - // Console.WriteLine("plaintext:"+ plaintext); - // var json = Newtonsoft.Json.JsonConvert.DeserializeObject(plaintext); - // Console.WriteLine("json:"+json); - // var phoneNumber = json.phoneNumber; - // var purePhoneNumber = json.purePhoneNumber; - - // //至此,成功获取到手机号 - // phone = Convert.ToString(purePhoneNumber); - // } - // } - //} + } catch (Exception ex) {