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