From e2c928529e84dc4a462cc57e43d1f23ebe6d7b72 Mon Sep 17 00:00:00 2001 From: u Date: Tue, 8 Nov 2022 17:13:38 +0800 Subject: [PATCH] 'fix' --- hasaki-gen-crud/template.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index a9a91d0..e8c8cc7 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -285,7 +285,7 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { defer func() { err := recover() if err != nil { - L.Error("StartQueueTaskPrefixHigHead3A60Temp3A60意外退出:", err) + L.Error("StartQueueTaskPrefixHigHead3A60Temp3A60 意外退出:", err) } time.Sleep(time.Second * 5) @@ -313,8 +313,8 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { { err := onec.queueEvent() session := onec.getXorm().NewSession() - session.Table(onec) defer session.Close() + session = session.Table(onec) whereQuery, whereArgs := onec.wherePrimaryKey() whereCond := onec.wherePrimaryKeyWithCond() if whereQuery != "" { @@ -324,9 +324,9 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { session = session.Where(whereCond) } if err != nil { - session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusIng).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusFail}) + session.Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusFail}) } else { - session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusIng).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess}) + session.Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess}) } } }()