public string canLogin(string bizContent, long timeStamp, string signature) { MessageLog.WriteLog(new LogParameterModel { ClassName = this.GetType().ToString(), MethodName = "canLogin", MethodParameters = $"bizContent:{bizContent},timeStamp:{timeStamp},signature:{signature}", LogLevel = ELogLevel.Info, Message = "接收参数", PathPrefix = "/log/ws", LogExt = "txt" }); var result = new CanLoginVo(); var paramItem = CommonLib.JsonHelper.Deserialize <LoginDto>(bizContent); if (paramItem == null) { result.resultCode = 0; result.resultMessage = "操作失败:bizContent不合法."; return(result.ToJSON()); } var loginName = paramItem.loginName; if (loginName.Length < 0) { result.resultCode = 0; result.resultMessage = "操作失败:账号不能为空."; return(result.ToJSON()); } var cBll = new UsersBll(); var item = cBll.LoginHgUsers(loginName, paramItem.password); if (item != null) { result.resultCode = 1; result.resultMessage = "登录成功."; result.userId = item.UserID.ToString(); result.realName = item.RealName; result.welfareCentreID = item.WelfareCentreID == null?Guid.Empty.ToString() : item.WelfareCentreID.ToString(); } else { result.resultCode = 0; result.resultMessage = "用户名或密码错误."; } return(result.ToJSON()); }