Ejemplo n.º 1
0
        public JResult UpdatePassword(CustRetrievePassword mRetrievePassword)
        {
            if (string.IsNullOrWhiteSpace(mRetrievePassword.Mobile))
            {
                return JResult._jResult(402, "手机号不能空");
            }

            var baseservice = ServiceLocatorFactory.GetServiceLocator().GetService<IBaseManagementService>();

            //检查验证码
            var cresult = baseservice.CheckVerification(mRetrievePassword.Mobile, mRetrievePassword.VCode, 3);
            if (cresult.errcode != 0)
            {
                //验证码错误
                //400验证码错误
                //401验证码过期
                return cresult;
            }

            return _custservice.UpdatePassword(mRetrievePassword);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 修改密码
 /// </summary>
 /// <param name="mRetrievePassword"></param>
 /// <returns></returns>
 public int UpdatePassword(CustRetrievePassword mRetrievePassword)
 {
     const string sql = "update cust_info set password=@password where mobile=@mobile;";
     var custModel = Helper.Execute(sql, new
     {
         password = mRetrievePassword.NewPassword,
         mobile = mRetrievePassword.Mobile
     });
     return custModel;
 }
Ejemplo n.º 3
0
        public JResult SaveNewPassword(CustRetrievePassword mRetrievePassword)
        {
            if (string.IsNullOrWhiteSpace(mRetrievePassword.Mobile))
            {
                return JResult._jResult(402, "手机号不能空");
            }

            return _custservice.UpdatePassword(mRetrievePassword);
        }