Esempio n. 1
0
 public void Test()
 {
     var model = new BaseVerification
     {
         Innerid = Guid.NewGuid().ToString(),
         Target = "18662240324"
     };
     var sss = nameof(model);
     var value = bms.SendVerification(model);
     Assert.IsTrue(value.errcode == 0);
 }
Esempio n. 2
0
        /// <summary>
        /// 验证码保存
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int SaveVerification(BaseVerification model)
        {
            int result;
            const string sql = "insert into base_verification (innerid, target, vcode, valid, createdtime, ttype,utype,content, result) values (uuid(), @target, @vcode, @valid, @createdtime, @ttype, @utype,@content, @result);";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }