/// <summary>
 /// 检测密码是为吻合
 /// </summary>
 /// <param name="accountPasswordDto">用户密码和id信息</param>
 /// <returns></returns>
 public bool CompareAccountPassword(AccountPasswordDto accountPasswordDto)
 => base.dbConnection.QueryFirstOrDefault <int>($"SELECT COUNT(*) FROM [{nameof(UserInfo).ToPlural()}] WHERE [{nameof(UserInfo.Id)}] = '{accountPasswordDto.Id}' AND [{nameof(UserInfo.Password)}] = '{MD5encryption.UserMd5($"happy_{accountPasswordDto.Password}")}'") > 0;
Example #2
0
 /// <summary>
 /// 检测密码是为吻合
 /// </summary>
 /// <param name="accountPasswordDto">用户密码和id信息</param>
 /// <returns></returns>
 public bool CompareAccountPassword(AccountPasswordDto accountPasswordDto)
 => this.userInfoDal.CompareAccountPassword(accountPasswordDto);