From 53198786e5e09237f0cb93935d2196387712bca3 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 19 Jul 2024 10:58:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=9C=E5=9B=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dao/happy_orchard_six_energy_ball_dao.go | 1 + src/implement/happy_orchard_six_energy_ball_db.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/dao/happy_orchard_six_energy_ball_dao.go b/src/dao/happy_orchard_six_energy_ball_dao.go index 603593c..f528394 100644 --- a/src/dao/happy_orchard_six_energy_ball_dao.go +++ b/src/dao/happy_orchard_six_energy_ball_dao.go @@ -7,4 +7,5 @@ import ( type HappyOrchardSixEnergyBallDao interface { GetHappyOrchardSixEnergyBall(sess *xorm.Session, uid, signTime, ballId int) (m *models.HappyOrchardSixEnergyBall, err error) + GetHappyOrchardSixEnergyBallAll(uid, signTime int) (mm *[]models.HappyOrchardSixEnergyBall, err error) } diff --git a/src/implement/happy_orchard_six_energy_ball_db.go b/src/implement/happy_orchard_six_energy_ball_db.go index 4caf71b..abb0834 100644 --- a/src/implement/happy_orchard_six_energy_ball_db.go +++ b/src/implement/happy_orchard_six_energy_ball_db.go @@ -26,3 +26,11 @@ func (h HappyOrchardSixEnergyBallDb) GetHappyOrchardSixEnergyBall(sess *xorm.Ses } return m, nil } +func (h HappyOrchardSixEnergyBallDb) GetHappyOrchardSixEnergyBallAll(uid, signTime int) (mm *[]models.HappyOrchardSixEnergyBall, err error) { + var m []models.HappyOrchardSixEnergyBall + err = h.Db.Where("uid=? and sign_time=?", uid, signTime).Find(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return &m, nil +}