Browse Source

'fix'

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

7
hasaki-gen-crud/template.go

@ -307,12 +307,13 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() {
session = session.Where(whereCond) session = session.Where(whereCond)
} }
i, err := session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusNone).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusIng})
i, err := session.Table(onec).Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusNone).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusIng})
if err == nil && i == 1 { if err == nil && i == 1 {
func() { func() {
{ {
err := onec.queueEvent() err := onec.queueEvent()
session := onec.getXorm().NewSession() session := onec.getXorm().NewSession()
session.Table(onec)
defer session.Close() defer session.Close()
whereQuery, whereArgs := onec.wherePrimaryKey() whereQuery, whereArgs := onec.wherePrimaryKey()
whereCond := onec.wherePrimaryKeyWithCond() whereCond := onec.wherePrimaryKeyWithCond()
@ -323,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_AutoQueueStatusNone).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusFail})
session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusIng).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusFail})
} else { } else {
session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusNone).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess})
session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusIng).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess})
} }
} }
}() }()

Loading…
Cancel
Save