feat: 增加 Where 关键字

This commit is contained in:
Argo-Tianyi 2022-01-06 09:00:15 +08:00
parent bdae9766dc
commit 06b3368a9f
1 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ class UserService : BaseDatabase, IUser
{
var salt = LgbCryptography.GenerateSalt();
var pwd = LgbCryptography.ComputeHash(code, salt);
var user = Database.FirstOrDefault<User>("UserName = @0", phone);
var user = Database.FirstOrDefault<User>("Where UserName = @0", phone);
if (user == null)
{
Database.BeginTransaction();
@ -184,7 +184,7 @@ class UserService : BaseDatabase, IUser
{
var salt = LgbCryptography.GenerateSalt();
var pwd = LgbCryptography.ComputeHash(password, salt);
var user = Database.FirstOrDefault<User>("UserName = @0", userName);
var user = Database.FirstOrDefault<User>("Where UserName = @0", userName);
bool ret;
if (user == null)
{