go-common/app/admin/ep/saga/dao/db_task.go
2019-04-22 18:49:16 +08:00

14 lines
333 B
Go

package dao
import (
"go-common/app/admin/ep/saga/model"
pkgerr "github.com/pkg/errors"
)
// Tasks get all the tasks for the specified project
func (d *Dao) Tasks(projID, status int) (tasks []*model.Task, err error) {
err = pkgerr.WithStack(d.db.Where(&model.Task{ProjID: projID, Status: status}).Find(&tasks).Error)
return
}