- Store and StoreMap add DeletedAt.

This commit is contained in:
gazebo
2018-09-20 10:07:58 +08:00
parent f874c37d14
commit 9d88344ddb
14 changed files with 206 additions and 172 deletions

View File

@@ -48,13 +48,13 @@ func Init(objCreator func(objHint string) interface{}, interfaceTypes ...interfa
func (m *DurableTaskMan) LoadPendingTask() (err error) {
db := dao.GetDB()
tasks := make([]*model.DurableTask, 0)
if err = dao.GetEntities(db, &tasks, utils.Params2Map(model.FieldStatus, 0), true); err == nil {
if err = dao.GetEntitiesByKV(db, &tasks, utils.Params2Map(model.FieldStatus, 0), true); err == nil {
for _, task := range tasks {
dTask := &DurableTask{
data: task,
}
m.tasks[task.TaskID] = dTask
return dao.GetEntities(db, &dTask.items, utils.Params2Map(model.FieldStatus, 0), true)
return dao.GetEntitiesByKV(db, &dTask.items, utils.Params2Map(model.FieldStatus, 0), true)
}
}
return err