fix: genasset 导入 Update 用 .Ctx(ctx)(GoFrame Update 参数歧义)+ 计划同步

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-08-13 16:50:09 +08:00
co-authored by Claude Opus 4.7
parent bd9f2bcd2e
commit 4a9eb1d7a2
2 changed files with 99 additions and 15 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ func importScripts(fl genFlags) {
})
}
b2, _ := json.Marshal(lines)
if _, err := g.DB().Model(consts.TableSceneNode).Data(g.Map{"script": string(b2)}).Where("id", d.NodeID).Update(ctx); err != nil {
if _, err := g.DB().Model(consts.TableSceneNode).Ctx(ctx).Data(g.Map{"script": string(b2)}).Where("id", d.NodeID).Update(); err != nil {
glog.Errorf(ctx, "[scripts] 导入失败 node %d: %v", d.NodeID, err)
continue
}