From 66e4be744ddaaf9434976ccbc90351a5133800d0 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 11 Jun 2024 10:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dao/happy_orchard_task_dao.go | 2 +- src/implement/happy_orchard_task_db.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dao/happy_orchard_task_dao.go b/src/dao/happy_orchard_task_dao.go index 0047abe..8e11259 100644 --- a/src/dao/happy_orchard_task_dao.go +++ b/src/dao/happy_orchard_task_dao.go @@ -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) } diff --git a/src/implement/happy_orchard_task_db.go b/src/implement/happy_orchard_task_db.go index 6f2e8a2..2dc75eb 100644 --- a/src/implement/happy_orchard_task_db.go +++ b/src/implement/happy_orchard_task_db.go @@ -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