修正错误
This commit is contained in:
@@ -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>
|
||||
/// 查询数据
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user