Parcourir la source

update

master
dengbiao il y a 6 mois
Parent
révision
e802997fd6
6 fichiers modifiés avec 41 ajouts et 4 suppressions
  1. +1
    -1
      src/dao/happy_happy_orchard_reward_dao.go
  2. +1
    -1
      src/dao/happy_happy_orchard_seed_dao.go
  3. +9
    -0
      src/dao/happy_orchard_user_waters_dao.go
  4. +1
    -1
      src/implement/happy_orchard_reward_db.go
  5. +1
    -1
      src/implement/happy_orchard_seed_db.go
  6. +28
    -0
      src/implement/happy_orchard_user_waters_db.go

+ 1
- 1
src/dao/happy_happy_orchard_reward_dao.go Voir le fichier

@@ -5,5 +5,5 @@ import (
)

type HappyOrchardRewardDao interface {
GetHappyOrchardRewardDao(id int) (m *models.HappyOrchardReward, err error)
GetHappyOrchardReward(id int) (m *models.HappyOrchardReward, err error)
}

+ 1
- 1
src/dao/happy_happy_orchard_seed_dao.go Voir le fichier

@@ -5,5 +5,5 @@ import (
)

type HappyOrchardSeedDao interface {
GetHappyOrchardSeedDao(id int) (m *models.HappyOrchardSeed, err error)
GetHappyOrchardSeed(id int) (m *models.HappyOrchardSeed, err error)
}

+ 9
- 0
src/dao/happy_orchard_user_waters_dao.go Voir le fichier

@@ -0,0 +1,9 @@
package dao

import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
)

type HappyOrchardUserWatersDao interface {
GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error)
}

+ 1
- 1
src/implement/happy_orchard_reward_db.go Voir le fichier

@@ -15,7 +15,7 @@ func NewHappyOrchardRewardDb(engine *xorm.Engine) dao.HappyOrchardRewardDao {
return &happyOrchardRewardDb{Db: engine}
}

func (h happyOrchardRewardDb) GetHappyOrchardRewardDao(id int) (m *models.HappyOrchardReward, err error) {
func (h happyOrchardRewardDb) GetHappyOrchardReward(id int) (m *models.HappyOrchardReward, err error) {
m = new(models.HappyOrchardReward)
has, err := h.Db.Where("id =?", id).Get(m)
if err != nil {


+ 1
- 1
src/implement/happy_orchard_seed_db.go Voir le fichier

@@ -15,7 +15,7 @@ func NewHappyOrchardSeedDb(engine *xorm.Engine) dao.HappyOrchardSeedDao {
return &happyOrchardSeedDb{Db: engine}
}

func (h happyOrchardSeedDb) GetHappyOrchardSeedDao(id int) (m *models.HappyOrchardSeed, err error) {
func (h happyOrchardSeedDb) GetHappyOrchardSeed(id int) (m *models.HappyOrchardSeed, err error) {
m = new(models.HappyOrchardSeed)
has, err := h.Db.Where("id =?", id).Get(m)
if err != nil {


+ 28
- 0
src/implement/happy_orchard_user_waters_db.go Voir le fichier

@@ -0,0 +1,28 @@
package implement

import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm"
)

type happyOrchardUserWatersDb struct {
Db *xorm.Engine
}

func NewHappyOrchardUserWatersDb(engine *xorm.Engine) dao.HappyOrchardUserWatersDao {
return &happyOrchardUserWatersDb{Db: engine}
}

func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) {
m = new(models.HappyOrchardUserWaters)
has, err := h.Db.Where("uid =?", uid).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}

Chargement…
Annuler
Enregistrer