diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index 4f62154..a9a91d0 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -307,12 +307,13 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { 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 { func() { { err := onec.queueEvent() session := onec.getXorm().NewSession() + session.Table(onec) defer session.Close() whereQuery, whereArgs := onec.wherePrimaryKey() whereCond := onec.wherePrimaryKeyWithCond() @@ -323,9 +324,9 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { session = session.Where(whereCond) } 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 { - 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}) } } }()