Browse Source

更新

master
huangjiajun 5 months ago
parent
commit
66e4be744d
2 changed files with 3 additions and 3 deletions
  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 View File

@@ -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 View File

@@ -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


Loading…
Cancel
Save