mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00
fix 动态API不能更新的问题
This commit is contained in:
parent
875b1d1c21
commit
d42be4d7c9
@ -227,8 +227,8 @@ namespace OpenAuth.App
|
||||
return result;
|
||||
}
|
||||
|
||||
// 设置更新时间
|
||||
if (!dict.ContainsKey("UpdateTime"))
|
||||
// 如果有UpdateTime字段,自动设置
|
||||
if (dict.ContainsKey("UpdateTime"))
|
||||
{
|
||||
dict["UpdateTime"] = DateTime.Now;
|
||||
}
|
||||
@ -245,7 +245,7 @@ namespace OpenAuth.App
|
||||
// 更新数据
|
||||
await _client.Updateable(dict)
|
||||
.AS(req.TableName)
|
||||
.Where("Id = @id", new { id = dict["Id"] })
|
||||
.WhereColumns("Id") // 使用Id作为更新条件
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
result.Message = "更新成功";
|
||||
|
Loading…
Reference in New Issue
Block a user