|
@@ -14,9 +14,9 @@ type HappyOrchardTaskDb struct { |
|
|
func NewHappyOrchardTaskDb(engine *xorm.Engine) dao.HappyOrchardTaskDao { |
|
|
func NewHappyOrchardTaskDb(engine *xorm.Engine) dao.HappyOrchardTaskDao { |
|
|
return &HappyOrchardTaskDb{Db: engine} |
|
|
return &HappyOrchardTaskDb{Db: engine} |
|
|
} |
|
|
} |
|
|
func (h HappyOrchardTaskDb) GetHappyOrchardTaskByPid(pid int) (mm *[]models.HappyOrchardTask, err error) { |
|
|
|
|
|
|
|
|
func (h HappyOrchardTaskDb) GetHappyOrchardTaskByPid(types string, pid int) (mm *[]models.HappyOrchardTask, err error) { |
|
|
var m []models.HappyOrchardTask |
|
|
var m []models.HappyOrchardTask |
|
|
if err := h.Db.Where("is_use=? and pid =?", 1, pid).Find(&m); err != nil { |
|
|
|
|
|
|
|
|
if err := h.Db.Where("type=? and is_use=? and pid =?", types, 1, pid).Find(&m); err != nil { |
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
} |
|
|
} |
|
|
return &m, nil |
|
|
return &m, nil |
|
|