Example #1
0
        public override int GetHashCode()
        {
            var hashCode = 229093474;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Quote);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Market);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Recommend);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Price);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Access);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Image);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Content);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Forecast);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ApiPath);

            hashCode = hashCode * -1521134295 + ResponseModule.GetHashCode();
            hashCode = hashCode * -1521134295 + Method.GetHashCode();
            return(hashCode);
        }
Example #2
0
        public override int GetHashCode()
        {
            var hashCode = -1498187238;

            hashCode = hashCode * -1521134295 + ResponseModule.GetHashCode();
            hashCode = hashCode * -1521134295 + Method.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ApiPath);

            return(hashCode);
        }
Example #3
0
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        public string UpdatePassword(dynamic _)
        {
            var recdata = this.GetResquetData <UpdatePassInfo>();

            WriteInfoLog("OrderModule", "updatepassword", "bb", Json.ToJson(recdata));
            try
            {
                bool flag = DataValidation(recdata.Date, recdata.Random, recdata.Staffid);
                if (!flag)
                {
                    return(this.WriteValidationLog("UserModule", recdata.Mac));
                }
                bool flag2 = TokenValidation(recdata.SessionId, recdata.Token);
                if (!flag2)
                {
                    return(this.SendTokenValidation());
                }
                PDAUserBusiness bl   = new PDAUserBusiness();
                int             ires = bl.UpdatePassword(recdata.data);
                if (ires == -1)
                {
                    ResponseModule res = new ResponseModule();
                    res.code    = "305";
                    res.message = "原始密码不正确!";
                    string strJson = Json.ToJson(res);
                    return(strJson);
                }
                if (ires == 1)
                {
                    return(this.SendData("修改密码成功!", ResponseType.Success));
                }
                else
                {
                    throw new Exception("未找到用户名!");
                }
            }
            catch (Exception ex)
            {
                return(this.WriteExceptionLog("UserModule", recdata.data.userName, recdata.Mac, "修改密码异常:" + Json.ToJson(recdata) + "[异常信息:" + ex.Message + "]", "修改密码异常:" + ex.Message));
            }
        }
Example #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        public string CheckOrder(dynamic _)
        {
            var recdata = this.GetResquetData <PDAOrderBase>();

            try
            {
                bool flag = DataValidation(recdata.Date, recdata.Random, recdata.Staffid);
                if (!flag)
                {
                    return(this.WriteValidationLog("OrderModule", recdata.Mac));
                }
                //判断令牌是否过期
                bool flag2 = TokenValidation(recdata.SessionId, recdata.Token);
                if (!flag2)
                {
                    return(this.SendTokenValidation());
                }

                PDAOrderBusiness bl = new PDAOrderBusiness();
                bool             bo = bl.CheckOrder(recdata.data);
                if (bo)
                {
                    ResponseModule res = new ResponseModule();
                    res.code    = "200";
                    res.message = "支付验证通过!";
                    string strJson = Json.ToJson(res);
                    return(strJson);
                }
                else
                {
                    return(this.WriteExceptionLog("OrderModule", recdata.data.userName, recdata.Mac, "支付验证异常:" + Json.ToJson(recdata), "支付验证异常"));
                }
            }
            catch (Exception ex)
            {
                return(this.WriteExceptionLog("OrderModule", recdata.data.userName, recdata.Mac, "支付验证异常:[" + recdata.data.orderId + "]异常信息:" + Json.ToJson(recdata) + "[异常信息:" + ex.Message + "]", "支付验证异常:" + ex.Message));
            }
        }