Browse Source

'fix'

master
u 2 years ago
parent
commit
e2c928529e
  1. 8
      hasaki-gen-crud/template.go

8
hasaki-gen-crud/template.go

@ -285,7 +285,7 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() {
defer func() { defer func() {
err := recover() err := recover()
if err != nil { if err != nil {
L.Error("StartQueueTaskPrefixHigHead3A60Temp3A60意外退出:", err)
L.Error("StartQueueTaskPrefixHigHead3A60Temp3A60 意外退出:", err)
} }
time.Sleep(time.Second * 5) time.Sleep(time.Second * 5)
@ -313,8 +313,8 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() {
{ {
err := onec.queueEvent() err := onec.queueEvent()
session := onec.getXorm().NewSession() session := onec.getXorm().NewSession()
session.Table(onec)
defer session.Close() defer session.Close()
session = session.Table(onec)
whereQuery, whereArgs := onec.wherePrimaryKey() whereQuery, whereArgs := onec.wherePrimaryKey()
whereCond := onec.wherePrimaryKeyWithCond() whereCond := onec.wherePrimaryKeyWithCond()
if whereQuery != "" { if whereQuery != "" {
@ -324,9 +324,9 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() {
session = session.Where(whereCond) session = session.Where(whereCond)
} }
if err != nil { 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 { } else {
session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusIng).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess})
session.Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess})
} }
} }
}() }()

Loading…
Cancel
Save