From 46d0d21a1af57631825480508533a381345f4d09 Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Fri, 4 Aug 2023 11:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../User/Services/UserService.cs | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) 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) {