修正错误

This commit is contained in:
gongxh
2022-05-05 20:42:02 +08:00
parent c6e7e582b8
commit b6b365339f
14 changed files with 28 additions and 57 deletions

View File

@@ -101,31 +101,7 @@ namespace CleanMachine.DAL.CM
/// <summary>
/// 删除一个数据
/// </summary>
public bool Delete(string Key)
{
return this.Delete("Key=@Key ", new { Key }) ;
}
/// <summary>
/// 获取一个对象
/// </summary>
public CleanMachine.Model.CM.LastPattleNum GetModel(string Key)
{
return this.GetList("Key=@Key", new { Key }).QueryFirstOrDefault();
}
/// <summary>
/// 存在
/// </summary>
public bool Exists(string Key)
{
string strSql = @"SELECT count(1) from CM_LastPattleNum WHERE Key=@Key ";
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { Key }) > 0;
}
/// <summary>
/// 查询数据

View File

@@ -114,7 +114,7 @@ namespace CleanMachine.DAL.SYS
/// </summary>
public CleanMachine.Model.SYS.User GetModel(string UserCode)
{
return this.GetList("USER_CODE=@UserCode", new { UserCode }).QueryFirstOrDefault();
return this.GetList("USER_CODE=@UserCode", new { UserCode }).FirstOrDefault();
}