Bläddra i källkod

更新

master
huangjiajun 5 månader sedan
förälder
incheckning
66e4be744d
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. +1
    -1
      src/dao/happy_orchard_task_dao.go
  2. +2
    -2
      src/implement/happy_orchard_task_db.go

+ 1
- 1
src/dao/happy_orchard_task_dao.go Visa fil

@@ -3,6 +3,6 @@ package dao
import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"

type HappyOrchardTaskDao interface {
GetHappyOrchardTaskByPid(pid int) (mm *[]models.HappyOrchardTask, err error)
GetHappyOrchardTaskByPid(types string, pid int) (mm *[]models.HappyOrchardTask, err error)
GetHappyOrchardTaskById(id int) (m *models.HappyOrchardTask, err error)
}

+ 2
- 2
src/implement/happy_orchard_task_db.go Visa fil

@@ -14,9 +14,9 @@ type HappyOrchardTaskDb struct {
func NewHappyOrchardTaskDb(engine *xorm.Engine) dao.HappyOrchardTaskDao {
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
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 &m, nil


Laddar…
Avbryt
Spara