From 0594697a81b0ea6ca770bc4238bad3b67ae2d2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Thu, 7 Dec 2023 13:54:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Common/LawyerArchivesController.cs | 2 +- 24Hour/Controllers/LoginController.cs | 2 -- 24Hour/WechatMessagerClient.cs | 14 +++++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 351e74d..66808ad 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -131,7 +131,7 @@ namespace _24Hour.Controllers.Common lawyer.departmentUnifiedSocialCreditCode = sccCode; var num = await _db.Updateable(lawyer).UpdateColumns(x => x.departmentUnifiedSocialCreditCode).ExecuteCommandAsync(); - if (num>0) + if (num > 0) { return Result.Success("更新成功"); } diff --git a/24Hour/Controllers/LoginController.cs b/24Hour/Controllers/LoginController.cs index 3d731a6..c8b6bb3 100644 --- a/24Hour/Controllers/LoginController.cs +++ b/24Hour/Controllers/LoginController.cs @@ -410,7 +410,6 @@ namespace _24Hour.Controllers } else { - ret.IsSucceed = false; ret.Message = "΢δȨע˺ţ"; } @@ -664,7 +663,6 @@ namespace _24Hour.Controllers ret.Message = $"ûδȨ޷¼ϵԱ"; return ret; } - } return ret; } diff --git a/24Hour/WechatMessagerClient.cs b/24Hour/WechatMessagerClient.cs index 106b124..0294221 100644 --- a/24Hour/WechatMessagerClient.cs +++ b/24Hour/WechatMessagerClient.cs @@ -44,10 +44,6 @@ namespace _24Hour appid = $"{configuration.GetSection("Wechat:appid").Value}"; secret = $"{configuration.GetSection("Wechat:secret").Value}"; secid = $"{configuration.GetSection("Wechat:secid").Value}"; - - logger.LogInformation($"appid {appid}"); - logger.LogInformation($"secret {secret}"); - logger.LogInformation($"secid {secid}"); } public async Task GetOpenId(string code) { @@ -116,7 +112,7 @@ namespace _24Hour msg = new { touser = useropenId, - template_id = "mRfzPnc_3JuV9cPhjKrRL3jX1C_JJoBGYtqEnbfadRM", + template_id = "XgrMTq1gwDfMJI6vN0jsSEv3xGy7v3amh0JMWj4SnAY", page = "pages/selfService/reception/reception", miniprogram_state = $"{_configuration.GetSection("Wechat:miniprogram_state").Value}", lang = "zh_CN", @@ -129,7 +125,9 @@ namespace _24Hour thing5 = new { value = $"{thing5}", color = "#173177" },// }, }; + logger.LogInformation($"发送审核成功通知 参数{msg.ConvertToJsonStr()} url {url}"); var re = HttpHelper.Post(posturl, msg); + logger.LogInformation($"发送审核成功通知 结果:{re}"); if (re.Jsonstr("errcode") == "0") return true; return false; @@ -161,7 +159,7 @@ namespace _24Hour if (string.IsNullOrEmpty(token)) { - string geturl = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx48108a0c98a3dab0&secret=e752e4fba67526eca21313a18c96a58f"; + string geturl = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={appid}&secret={secid}"; var re1 = HttpHelper.Get(geturl); if (re1.Jsonstr("errcode") == null) { @@ -187,7 +185,7 @@ namespace _24Hour msg = new { touser = useropenId, - template_id = "sPbZd6ro14L4uCR_TyDlB_nKKBq-iSvVBlOCmtTDDt0", + template_id = "bfA-t5EN4pkQzAOS17SRPRKvmMteaJt0kw3YKIcovIQ", page = "pages/selfService/reception/reception", miniprogram_state = $"{_configuration.GetSection("Wechat:miniprogram_state").Value}", lang = "zh_CN", @@ -200,7 +198,9 @@ namespace _24Hour thing5 = new { value = $"{thing5}" },//事由 }, }; + logger.LogInformation($"发送审核成功通知 参数{msg.ConvertToJsonStr()} url {url}"); var re = HttpHelper.Post(posturl, msg); + logger.LogInformation($"发送审核通知 结果:{re}"); if (re.Jsonstr("errcode") == "0") return true; return false;