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}) } } }()