diff --git a/24Hour/Controllers/Common/LawyerservicesController.cs b/24Hour/Controllers/Common/LawyerservicesController.cs index eee5d13..fbaddea 100644 --- a/24Hour/Controllers/Common/LawyerservicesController.cs +++ b/24Hour/Controllers/Common/LawyerservicesController.cs @@ -130,7 +130,7 @@ namespace _24Hour.Controllers.Common { var jcguserdata = await _db.Queryable() .Where(q => q.usertype == 0 && q.messages ==true && q.unitCode == Lawyerdata.unitCode).ToListAsync(); - if (jcguserdata != null) + if (jcguserdata.Count>0) { foreach (var item in jcguserdata) { diff --git a/24Hour/Controllers/Common/WebSocketController.cs b/24Hour/Controllers/Common/WebSocketController.cs index 694bd88..b750e16 100644 --- a/24Hour/Controllers/Common/WebSocketController.cs +++ b/24Hour/Controllers/Common/WebSocketController.cs @@ -554,17 +554,19 @@ namespace _24Hour.Controllers.Common [HttpGet] [Route("gzhwxts")] [AllowAnonymous] - public async Task gzhwxts(string openId) + public async Task gzhwxts(string openId) { try { //ozRTw0uB1w-Puu73araMIHrdKlSQ - _wechatMessagerClient.gzhwxts(openId, "律师","19536521444","查阅xxx人卷宗",""); + var sss= _wechatMessagerClient.gzhwxts(openId, "律师","19536521444","查阅xxx人卷宗",""); + + return sss; } catch (Exception) { } - return true; + return "失败"; } } diff --git a/24Hour/WechatMessagerClient.cs b/24Hour/WechatMessagerClient.cs index 20f1612..bd55eda 100644 --- a/24Hour/WechatMessagerClient.cs +++ b/24Hour/WechatMessagerClient.cs @@ -274,7 +274,7 @@ namespace _24Hour /// 微信公众号消息提醒,推送检察官 /// /// - public bool gzhwxts(string? useropenId, string? name,string? phone, string? matter, string? attention) + public string gzhwxts(string? useropenId, string? name,string? phone, string? matter, string? attention) { try { @@ -328,18 +328,20 @@ namespace _24Hour }; var re = HttpHelper.Post(posturl, msg); if (re.Jsonstr("errcode") == "0") - return true; - return false; + return "成功"; + return $"失败:{re}"; } catch (Exception ex) { + return $"{ex.Message}"; } - return true; + return "成功"; } catch (Exception ex) { + return $"{ex.Message}"; } - return false; + return "失败"; } } diff --git a/24Hour/appsettings.json b/24Hour/appsettings.json index e441f23..3ac2acd 100644 --- a/24Hour/appsettings.json +++ b/24Hour/appsettings.json @@ -8,7 +8,7 @@ "AllowedHosts": "*", "ConnectionStrings": { "DBType": "MySQL", - "MySQLConnString": "server=127.0.0.1;Database=equipmentrearend;Uid=root;Pwd=insght;Allow User Variables=True;SslMode=none;AllowPublicKeyRetrieval=True;" + "MySQLConnString": "server=192.168.0.251;Database=equipmentrearend;Uid=root;Pwd=sa@admin;Allow User Variables=True;SslMode=none;AllowPublicKeyRetrieval=True;" }, //JwtConfig "JwtConfiguration": {