dengbiao pirms 6 mēnešiem
vecāks
revīzija
d997c1f7aa
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt