Browse Source

update

master
dengbiao 7 months ago
parent
commit
0b135e3aba
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/implement/happy_orchard_user_waters_db.go

+ 5
- 5
src/implement/happy_orchard_user_waters_db.go View File

@@ -7,20 +7,20 @@ import (
"xorm.io/xorm"
)

type happyOrchardUserWatersDb struct {
type HappyOrchardUserWatersDb struct {
Db *xorm.Engine
Sess *xorm.Session
}

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

func NewHappyOrchardUserWatersSess(sess *xorm.Session) dao.HappyOrchardUserWatersDao {
return &happyOrchardUserWatersDb{Sess: sess}
return &HappyOrchardUserWatersDb{Sess: sess}
}

func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) {
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 {
@@ -31,7 +31,7 @@ func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models.
}
return m, nil
}
func (h happyOrchardUserWatersDb) GetHappyOrchardUserWatersSess(uid int) (m *models.HappyOrchardUserWaters, err error) {
func (h HappyOrchardUserWatersDb) GetHappyOrchardUserWatersSess(uid int) (m *models.HappyOrchardUserWaters, err error) {
m = new(models.HappyOrchardUserWaters)
has, err := h.Sess.Where("uid =?", uid).Get(m)
if err != nil {


Loading…
Cancel
Save