From ff74422d58a8f102f3d691fc0280b14d00d74b2f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 7 Aug 2024 09:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=A5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dao/service_award_dividend_relation_dao.go | 3 ++- src/implement/service_award_dividend_relation_db.go | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/dao/service_award_dividend_relation_dao.go b/src/dao/service_award_dividend_relation_dao.go index 0677bc7..2791db4 100644 --- a/src/dao/service_award_dividend_relation_dao.go +++ b/src/dao/service_award_dividend_relation_dao.go @@ -1,4 +1,4 @@ -package dao +package dao import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" @@ -6,6 +6,7 @@ import ( ) type ServiceAwardDividendRelationDao interface { + GetServiceAwardDividendRelationByUid(uid int) (m *models.ServiceAwardDividendRelation, err error) InsertServiceAwardDividendRelationBySess(sees *xorm.Session, m *models.ServiceAwardDividendRelation) (id int, err error) InsertServiceAwardDividendRelation(m *models.ServiceAwardDividendRelation) (id int, err error) SaveServiceAwardDividendRelation(sees *xorm.Session, id interface{}, m *models.ServiceAwardDividendRelation, forceColums ...string) (affected int64, err error) diff --git a/src/implement/service_award_dividend_relation_db.go b/src/implement/service_award_dividend_relation_db.go index 60b05e5..ca53317 100644 --- a/src/implement/service_award_dividend_relation_db.go +++ b/src/implement/service_award_dividend_relation_db.go @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" @@ -40,3 +40,10 @@ func (s ServiceAwardDividendRelationDb) InsertServiceAwardDividendRelation(m *mo id = m.Id return id, nil } +func (s ServiceAwardDividendRelationDb) GetServiceAwardDividendRelationByUid(uid int) (m *models.ServiceAwardDividendRelation, err error) { + _, err = s.Db.Where("uid=?", uid).Get(m) + if err != nil { + return nil, err + } + return m, nil +}