From a640da92ba8324771d19b42a9b08dbbf8e9b931a Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 8 Nov 2024 10:50:16 +0800 Subject: [PATCH] update --- go.mod | 4 ---- src/dao/egg_public_platoon_basic_setting_dao.go | 1 + src/dao/public_platoon_user_relation_dao.go | 1 + src/implement/public_platoon_basic_setting_implement.go | 8 ++++++++ src/implement/public_platoon_user_relation_implement.go | 4 ++++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index eed3da6..2d08216 100644 --- a/go.mod +++ b/go.mod @@ -7,16 +7,13 @@ require ( github.com/syyongx/php2go v0.9.8 go.uber.org/zap v1.13.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 - gopkg.in/yaml.v3 v3.0.1 xorm.io/xorm v1.3.1 ) require ( filippo.io/edwards25519 v1.1.0 // indirect - github.com/go-xorm/xorm v0.7.9 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/jinzhu/copier v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -30,5 +27,4 @@ require ( golang.org/x/sys v0.8.0 // indirect golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 // indirect xorm.io/builder v0.3.13 // indirect - xorm.io/core v0.7.3 // indirect ) diff --git a/src/dao/egg_public_platoon_basic_setting_dao.go b/src/dao/egg_public_platoon_basic_setting_dao.go index 8cce486..541ea33 100644 --- a/src/dao/egg_public_platoon_basic_setting_dao.go +++ b/src/dao/egg_public_platoon_basic_setting_dao.go @@ -12,4 +12,5 @@ type PublicPlatoonBasicSettingDao interface { PublicPlatoonBasicSettingUpdate(id interface{}, PublicPlatoonBasicSetting *model.PublicPlatoonBasicSetting, forceColums ...string) (int64, error) PublicPlatoonBasicSettingGetOneByParams(params map[string]interface{}) (*model.PublicPlatoonBasicSetting, error) PublicPlatoonBasicSettingFindByParams(params map[string]interface{}) (*[]model.PublicPlatoonBasicSetting, error) + PublicPlatoonBasicSettingGetOne() (*model.PublicPlatoonBasicSetting, error) } diff --git a/src/dao/public_platoon_user_relation_dao.go b/src/dao/public_platoon_user_relation_dao.go index 552efc1..0b3b732 100644 --- a/src/dao/public_platoon_user_relation_dao.go +++ b/src/dao/public_platoon_user_relation_dao.go @@ -13,4 +13,5 @@ type PublicPlatoonUserRelationDao interface { PublicPlatoonUserRelationFindByPid(fatherUid int64, fatherName, positionName string) ([]model.PublicPlatoonUserRelation, error) PublicPlatoonUserRelationFindCountByPosition(fatherUid int64, fatherName, positionName string, startPosition, endPosition int64) ([]model.PublicPlatoonUserRelation, int64, error) PublicPlatoonUserRelationFindByParamsByPage(params map[string]interface{}, page, pageSize int) (*[]model.PublicPlatoonUserRelation, error) + PublicPlatoonUserRelationGet(phone int, uid int64, inviteCode string) (mm *[]model.PublicPlatoonUserRelation, err error) } diff --git a/src/implement/public_platoon_basic_setting_implement.go b/src/implement/public_platoon_basic_setting_implement.go index 7723cb4..7adeb25 100644 --- a/src/implement/public_platoon_basic_setting_implement.go +++ b/src/implement/public_platoon_basic_setting_implement.go @@ -19,6 +19,14 @@ type PublicPlatoonBasicSettingDb struct { Db *xorm.Engine } +func (p PublicPlatoonBasicSettingDb) PublicPlatoonBasicSettingGetOne() (*model.PublicPlatoonBasicSetting, error) { + var m model.PublicPlatoonBasicSetting + if has, err := p.Db.Where("id >= 1").Get(&m); err != nil || has == false { + return nil, zhios_order_relate_logx.Error(err) + } + return &m, nil +} + func (p PublicPlatoonBasicSettingDb) PublicPlatoonBasicSettingInsert(PublicPlatoonBasicSetting *model.PublicPlatoonBasicSetting) (int, error) { _, err := p.Db.InsertOne(PublicPlatoonBasicSetting) if err != nil { diff --git a/src/implement/public_platoon_user_relation_implement.go b/src/implement/public_platoon_user_relation_implement.go index 1eb44fe..6e2af74 100644 --- a/src/implement/public_platoon_user_relation_implement.go +++ b/src/implement/public_platoon_user_relation_implement.go @@ -119,3 +119,7 @@ func (p PublicPlatoonUserRelationDb) PublicPlatoonUserRelationFindByParamsByPage } } } + +func (p PublicPlatoonUserRelationDb) agPublicPlatoonUserRelationGet(phone int, uid int64, inviteCode string) (mm *[]model.PublicPlatoonUserRelation, err error) { + return +}