From 5fdd7fe91d077edf7b4b72c0b7305a2ad102e0a4 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 10:17:42 +0800 Subject: [PATCH 01/26] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/task_login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldsrv/task_login.go b/worldsrv/task_login.go index c215258..0c52e59 100644 --- a/worldsrv/task_login.go +++ b/worldsrv/task_login.go @@ -354,12 +354,12 @@ func SCLogin(s *netlib.Session, sid int64, csLogin *login_proto.CSLogin, acc *mo ClientParam: string(model.ClinetBuf), NextDayTs: common.GetDayNextStartTs(time.Now().Unix()), IsNewUser: isFirstLogin, - SnId: acc.SnId, } if acc != nil { now := time.Now() sclogin.AccId = proto.String(acc.AccountId.Hex()) sclogin.SrvTs = proto.Int64(now.Unix()) + sclogin.SnId = acc.SnId if code == login_proto.OpResultCode_OPRC_Sucess { acc.LastLoginTime = now acc.LoginTimes++ From be6a9981cbc0fc15b29336bed7dc348c36a36ba6 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 14:30:21 +0800 Subject: [PATCH 02/26] mongodb --- mongo/export.go | 21 +++++++++++++++++++++ mongo/internal/mongo.go | 12 ++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/mongo/export.go b/mongo/export.go index 312e905..b464133 100644 --- a/mongo/export.go +++ b/mongo/export.go @@ -42,6 +42,27 @@ func Close() { internal.Close(_manager) } +// GetDatabase 获取数据库 +// platform: 平台id +// database: 数据库名称 +func GetDatabase(platform, database string) (*Database, error) { + if _manager == nil { + return nil, errors.New("mongo manager is nil, please call Init() first") + } + + return _manager.GetDatabase(platform, database) +} + +// GetGlobalDatabase 获取全局库 +// database: 数据库名称 +func GetGlobalDatabase(database string) (*Database, error) { + if _manager == nil { + return nil, errors.New("mongo manager is nil, please call Init() first") + } + + return _manager.GetDatabase("global", database) +} + // GetGlobalCollection 获取全局库 // database: 数据库名称 // collection: 集合名称 diff --git a/mongo/internal/mongo.go b/mongo/internal/mongo.go index 1c2282f..9d54b9c 100644 --- a/mongo/internal/mongo.go +++ b/mongo/internal/mongo.go @@ -98,6 +98,14 @@ type Manager struct { } func (m *Manager) GetCollection(key, database, collection string) (*Collection, error) { + d, err := m.GetDatabase(key, database) + if err != nil { + return nil, err + } + return d.GetCollection(collection) +} + +func (m *Manager) GetDatabase(key, database string) (*Database, error) { switch key { case "global": v, ok := m.global.Load(database) @@ -113,7 +121,7 @@ func (m *Manager) GetCollection(key, database, collection string) (*Collection, m.global.Store(database, v) } d, _ := v.(*Database) - return d.GetCollection(collection) + return d, nil default: var mp *sync.Map @@ -137,7 +145,7 @@ func (m *Manager) GetCollection(key, database, collection string) (*Collection, mp.Store(database, v) } d, _ := v.(*Database) - return d.GetCollection(collection) + return d, nil } } From 9e85b4a1a7ee9209b61458d97ef80ae268dde9f8 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 14:48:59 +0800 Subject: [PATCH 03/26] =?UTF-8?q?=E6=96=B0=E6=89=8B=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/etcd.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index 12c81b6..dcb5ba5 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -350,6 +350,21 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e default: logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) } + + PlatformMgrSingleton.GetConfig("1").GuideConfig = &webapi.GuideConfig{ + Platform: "1", + Info: []*webapi.GuideInfo{ + { + On: 1, + Skip: 1, + GuideId: 1, + Awards: nil, + MaxStep: 4, + AwardStep: 2, + Url: "", + }, + }, + } } func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) { From 49a8c4190809e0be2d430c0dbcfa48b65594549d Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 15:19:55 +0800 Subject: [PATCH 04/26] =?UTF-8?q?=E6=8A=BD=E5=A5=96=E6=88=BF=E5=8D=A1?= =?UTF-8?q?=E6=B6=88=E8=80=97=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbproxy/svc/l_lotteryuser.go | 47 ++++++++++++++++++++++++++++++++++++ dbproxy/svc/u_lottery.go | 11 +++++++++ 2 files changed, 58 insertions(+) create mode 100644 dbproxy/svc/l_lotteryuser.go diff --git a/dbproxy/svc/l_lotteryuser.go b/dbproxy/svc/l_lotteryuser.go new file mode 100644 index 0000000..a948fae --- /dev/null +++ b/dbproxy/svc/l_lotteryuser.go @@ -0,0 +1,47 @@ +package svc + +import ( + "errors" + "github.com/globalsign/mgo" + "github.com/globalsign/mgo/bson" + "mongo.games.com/game/dbproxy/mongo" +) + +var ( + LotteryUserLogDBErr = errors.New("log_lotteryuser db open failed.") +) + +type LotteryUserLog struct { + Platform string `bson:"-"` + CId int64 + SnId int32 + StartTs int64 + CostCard int64 +} + +func LotteryUserLogsCollection(plt string) *mongo.Collection { + s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, "log") + if s != nil { + c, first := s.DB().C("log_lotteryuser") + if first { + c.EnsureIndex(mgo.Index{Key: []string{"cid"}, Background: true, Sparse: true}) + c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true}) + c.EnsureIndex(mgo.Index{Key: []string{"startts"}, Background: true, Sparse: true}) + c.EnsureIndex(mgo.Index{Key: []string{"cid", "startts", "snid"}, Background: true, Sparse: true}) + } + return c + } + return nil +} + +func UpsertLotteryUserLog(log *LotteryUserLog) error { + c := LotteryUserLogsCollection(log.Platform) + if c == nil { + return LotteryUserLogDBErr + } + _, err := c.Upsert(bson.M{"cid": log.CId, "snid": log.SnId, "startts": log.StartTs}, log) + if err != nil { + return err + } + return nil +} diff --git a/dbproxy/svc/u_lottery.go b/dbproxy/svc/u_lottery.go index baac3d0..c977e15 100644 --- a/dbproxy/svc/u_lottery.go +++ b/dbproxy/svc/u_lottery.go @@ -2,6 +2,7 @@ package svc import ( "errors" + "mongo.games.com/goserver/core/logger" "net/rpc" "github.com/globalsign/mgo" @@ -59,6 +60,16 @@ func UpsertLottery(plt string, item []*model.Lottery) (err error) { if err != nil { return } + err = UpsertLotteryUserLog(&LotteryUserLog{ + Platform: plt, + CId: v.CId, + SnId: v.SnId, + StartTs: v.StartTs, + CostCard: v.CostCard, + }) + if err != nil { + logger.Logger.Warnf("UpsertLotteryUserLog error: %v", err) + } } return } From 904f30ee8ca9e23aed33484faa4df00962c45c3f Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 15:21:57 +0800 Subject: [PATCH 05/26] =?UTF-8?q?=E6=8B=9B=E5=8B=9F=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/scenemgr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldsrv/scenemgr.go b/worldsrv/scenemgr.go index a546d0b..18003f6 100644 --- a/worldsrv/scenemgr.go +++ b/worldsrv/scenemgr.go @@ -407,10 +407,10 @@ func (m *SceneMgr) FindCustomInviteRoom(p *Player) *Scene { return false } iN, jN := ret[i].GetMaxPlayerNum()-ret[i].GetPlayerCnt(), ret[j].GetMaxPlayerNum()-ret[j].GetPlayerCnt() - if iN > jN { + if iN < jN { return true } - if iN < jN { + if iN > jN { return false } if ret[i].RecruitTimes > ret[j].RecruitTimes { From 0176f59e76240808a3589a7558413226ca7857ab Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 16:42:08 +0800 Subject: [PATCH 06/26] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/etcd.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index dcb5ba5..12c81b6 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -350,21 +350,6 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e default: logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) } - - PlatformMgrSingleton.GetConfig("1").GuideConfig = &webapi.GuideConfig{ - Platform: "1", - Info: []*webapi.GuideInfo{ - { - On: 1, - Skip: 1, - GuideId: 1, - Awards: nil, - MaxStep: 4, - AwardStep: 2, - Url: "", - }, - }, - } } func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) { From 8444db2e85cc5ae74b0d09ccbf82739f0886dd58 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 17:06:02 +0800 Subject: [PATCH 07/26] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E7=AE=97=E6=B3=95=E6=AF=8F=E6=AC=A1=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E4=B8=8D=E5=90=8C=E6=88=BF=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/scenemgr.go | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/worldsrv/scenemgr.go b/worldsrv/scenemgr.go index 18003f6..7ca93a1 100644 --- a/worldsrv/scenemgr.go +++ b/worldsrv/scenemgr.go @@ -26,6 +26,7 @@ var SceneMgrSingleton = &SceneMgr{ coinSceneAutoId: common.CoinSceneStartId, hundredSceneAutoId: common.HundredSceneStartId, password: make(map[string]struct{}), + pushList: make(map[int]struct{}), } // SceneMgr 房间管理器 @@ -38,6 +39,8 @@ type SceneMgr struct { coinSceneAutoId int // 金币场房间号 hundredSceneAutoId int // 百人场房间号 password map[string]struct{} // 密码 + pushList map[int]struct{} // 已经推荐过的房间列表 + lastPushSceneId int // 最后推荐的房间id } // AllocReplayCode 获取回访码 @@ -422,7 +425,49 @@ func (m *SceneMgr) FindCustomInviteRoom(p *Player) *Scene { return ret[i].createTime.Unix() < ret[j].createTime.Unix() }) + // 删除没有的房间 + var list []*Scene + var pushList = map[int]struct{}{} + for k := range m.pushList { + var has bool + for _, v := range ret { + if v.sceneId == k { + has = true + break + } + } + if has { + pushList[k] = struct{}{} + } + } + m.pushList = pushList + + // 删除推荐过的房间 + for _, v := range ret { + if _, ok := m.pushList[v.sceneId]; !ok { + list = append(list, v) + } + } + + if len(list) > 0 { + m.pushList[list[0].sceneId] = struct{}{} + return list[0] + } + if len(ret) > 0 { + // 全都推荐过了,循环推荐房间 + var b bool + for _, v := range ret { + if b { + m.lastPushSceneId = v.sceneId + return v + } + if v.sceneId == m.lastPushSceneId { + b = true + } + } + // 没找到,从头开始 + m.lastPushSceneId = ret[0].sceneId return ret[0] } From b21bafe1aacfc64548a02d505fc8c90103712065 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 5 Nov 2024 17:27:09 +0800 Subject: [PATCH 08/26] =?UTF-8?q?=E4=BF=AE=E6=94=B9gitlab-ci.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d406e6b..c57861e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,11 @@ default: tags: - gitlab +cache: + paths: + - $GOPATH/pkg/mod/ + policy: pull-push + # 锁定作业,防止并发流水线执行 lock_job: stage: lock From f63f3bb5f9e6c294dba4722adaa31e6892dabb24 Mon Sep 17 00:00:00 2001 From: skeleton Date: Tue, 5 Nov 2024 09:44:12 +0000 Subject: [PATCH 09/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c57861e..b7fcbfb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,11 +14,6 @@ default: tags: - gitlab -cache: - paths: - - $GOPATH/pkg/mod/ - policy: pull-push - # 锁定作业,防止并发流水线执行 lock_job: stage: lock @@ -48,7 +43,7 @@ build-job: # 编译 - echo '编译' - go env -w GO111MODULE='on' - - go mod tidy + - if [ ! -z "$(git status --porcelain go.mod go.sum)" ]; then go mod tidy; fi - | while IFS= read -r line || [[ -n $line ]] do From 48a87660ea3e914552d831ab00bfb9fd3687e93a Mon Sep 17 00:00:00 2001 From: skeleton Date: Tue, 5 Nov 2024 09:47:39 +0000 Subject: [PATCH 10/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7fcbfb..3178ff1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,6 +35,9 @@ build-job: script: - git checkout $CI_COMMIT_REF_NAME - git pull origin $CI_COMMIT_REF_NAME + - if [ ! -z "$(git status --porcelain go.mod go.sum)" ]; then + GOMODTIDY=1; + fi # 拷贝到GOPATH - echo '拷贝到GOPATH' - rsync -rvz --delete ./* $GOPATH/src/$ProjectPath @@ -43,7 +46,9 @@ build-job: # 编译 - echo '编译' - go env -w GO111MODULE='on' - - if [ ! -z "$(git status --porcelain go.mod go.sum)" ]; then go mod tidy; fi + - if [ "$GOMODTIDY" == 1 ]; then + go mod tidy; + fi - | while IFS= read -r line || [[ -n $line ]] do From a6db38c3fc24eb69dca278824e8c9bee55bd1c22 Mon Sep 17 00:00:00 2001 From: skeleton Date: Tue, 5 Nov 2024 09:59:04 +0000 Subject: [PATCH 11/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3178ff1..978d91c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,13 @@ default: tags: - gitlab +cache: + key: "$CI_COMMIT_REF_NAME-$(md5sum go.mod go.sum)" + paths: + - .cache/go-build/ + - $GOPATH/pkg/mod/ + policy: pull-push + # 锁定作业,防止并发流水线执行 lock_job: stage: lock From d044890e2648dcd88ad1a255636ee7db7c818714 Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:04:01 +0000 Subject: [PATCH 12/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 978d91c..feef94c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,7 +61,7 @@ build-job: do cd $line echo "编译 $line" - go build -v + go build cd .. done < shell/programs.txt From 5ddb0e08d6bbcc299f1566131c796807101f644e Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:08:11 +0000 Subject: [PATCH 13/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index feef94c..52ed126 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-job: fi # 拷贝到GOPATH - echo '拷贝到GOPATH' - - rsync -rvz --delete ./* $GOPATH/src/$ProjectPath + - rsync -rv --delete ./* $GOPATH/src/$ProjectPath # 进入项目目录 - cd $GOPATH/src/$ProjectPath # 编译 From 6cdc64f5e62991af46dc376737c9a528be225dfa Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:23:13 +0000 Subject: [PATCH 14/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52ed126..f76bed5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-job: fi # 拷贝到GOPATH - echo '拷贝到GOPATH' - - rsync -rv --delete ./* $GOPATH/src/$ProjectPath + - rsync -rv --no-perms --delete ./* $GOPATH/src/$ProjectPath # 进入项目目录 - cd $GOPATH/src/$ProjectPath # 编译 From af0e29fc1ab8f89591ac6fb7c09c4d7cce3ec208 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Wed, 6 Nov 2024 09:23:51 +0800 Subject: [PATCH 15/26] =?UTF-8?q?=E9=87=91=E5=B8=81=E5=AD=98=E9=92=B1?= =?UTF-8?q?=E7=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/player.go | 3 +-- worldsrv/welfmgr.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/model/player.go b/model/player.go index 38a125a..ef8d866 100644 --- a/model/player.go +++ b/model/player.go @@ -129,8 +129,7 @@ const ( ActivityLog_BlindBox // 开盲盒 ActivityLog_ContinuousPay // 累计充值 ActivityLog_PigBank // 购买存钱罐 - ActivityLog_Shop //商城购买 - ActivityLog_Exchange //商城兑换 + ActivityLog_CoinPigBank //金币存钱罐 ) type PlayerGameCtrlData struct { diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 95960ad..c14348e 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -1856,7 +1856,7 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) { pack.Price = int64(infoData.CoinPrice) logger.Logger.Tracef("PigbankTakeCoin snid: %v pack: %v", p.SnId, pack) p.SendToClient(int(welfare.SPacketID_PACKET_SCPigbankTakeCoin), pack) - + mq.Write(model.GenerateActivityLog(p.SnId, p.Platform, model.ActivityLog_CoinPigBank, 1)) } } From 989354dd4ad131bd26155622d842906dc5324a3c Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:25:07 +0000 Subject: [PATCH 16/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f76bed5..0bbf05c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-job: fi # 拷贝到GOPATH - echo '拷贝到GOPATH' - - rsync -rv --no-perms --delete ./* $GOPATH/src/$ProjectPath + - rsync -rvc --no-perms --delete ./* $GOPATH/src/$ProjectPath # 进入项目目录 - cd $GOPATH/src/$ProjectPath # 编译 From 6c7fba3be29b4e3f639d2413ceb357c1e8b9397e Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:26:48 +0000 Subject: [PATCH 17/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bbf05c..2773d59 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,8 +17,7 @@ default: cache: key: "$CI_COMMIT_REF_NAME-$(md5sum go.mod go.sum)" paths: - - .cache/go-build/ - - $GOPATH/pkg/mod/ + - ~/.cache/go-build/ policy: pull-push # 锁定作业,防止并发流水线执行 @@ -61,7 +60,7 @@ build-job: do cd $line echo "编译 $line" - go build + go build -v cd .. done < shell/programs.txt From 869801ff59dd41894c5605e5cb90bd0975a7e452 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Wed, 6 Nov 2024 09:27:28 +0800 Subject: [PATCH 18/26] =?UTF-8?q?=E9=87=91=E5=B8=81=E5=AD=98=E9=92=B1?= =?UTF-8?q?=E7=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/player.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/player.go b/model/player.go index ef8d866..5686106 100644 --- a/model/player.go +++ b/model/player.go @@ -129,6 +129,8 @@ const ( ActivityLog_BlindBox // 开盲盒 ActivityLog_ContinuousPay // 累计充值 ActivityLog_PigBank // 购买存钱罐 + ActivityLog_Shop //商城购买 + ActivityLog_Exchange //商城兑换 ActivityLog_CoinPigBank //金币存钱罐 ) From 05bab06da1df6e17889693aae65b926702d0d3d0 Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:49:02 +0000 Subject: [PATCH 19/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2773d59..fcf15eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,12 +14,6 @@ default: tags: - gitlab -cache: - key: "$CI_COMMIT_REF_NAME-$(md5sum go.mod go.sum)" - paths: - - ~/.cache/go-build/ - policy: pull-push - # 锁定作业,防止并发流水线执行 lock_job: stage: lock From ebb127fc4bb7900c7c90b0292e033f07b1800f08 Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:54:56 +0000 Subject: [PATCH 20/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fcf15eb..9318eb6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,6 +49,7 @@ build-job: - if [ "$GOMODTIDY" == 1 ]; then go mod tidy; fi + - ls -alh ~/.cache/go-build/ - | while IFS= read -r line || [[ -n $line ]] do From 44f0a7d451d328acc13884b285a89f47f2a1a649 Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 01:58:35 +0000 Subject: [PATCH 21/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9318eb6..fcf15eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,7 +49,6 @@ build-job: - if [ "$GOMODTIDY" == 1 ]; then go mod tidy; fi - - ls -alh ~/.cache/go-build/ - | while IFS= read -r line || [[ -n $line ]] do From 22b5227ccad622b3252a30c7140eef8d3377ce0c Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 02:03:01 +0000 Subject: [PATCH 22/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fcf15eb..e1de17d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ build-job: do cd $line echo "编译 $line" - go build -v + go build -n cd .. done < shell/programs.txt From cf0cba428aba479f6b6e6c041a610a10ef736820 Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 02:15:34 +0000 Subject: [PATCH 23/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e1de17d..6fa0dd9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,12 +49,13 @@ build-job: - if [ "$GOMODTIDY" == 1 ]; then go mod tidy; fi + - export GODEBUG=gctrace=1 - | while IFS= read -r line || [[ -n $line ]] do cd $line echo "编译 $line" - go build -n + go build -v cd .. done < shell/programs.txt From fab70856c596b0a142c589f91039d3897b7bb9bf Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 02:31:35 +0000 Subject: [PATCH 24/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6fa0dd9..4b31acd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,10 +46,10 @@ build-job: # 编译 - echo '编译' - go env -w GO111MODULE='on' + - go env - if [ "$GOMODTIDY" == 1 ]; then go mod tidy; fi - - export GODEBUG=gctrace=1 - | while IFS= read -r line || [[ -n $line ]] do From d5566d618183017619c607286675f70b6eb1d068 Mon Sep 17 00:00:00 2001 From: skeleton Date: Wed, 6 Nov 2024 02:33:57 +0000 Subject: [PATCH 25/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b31acd..a55ae0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,6 @@ build-job: - cd $GOPATH/src/$ProjectPath # 编译 - echo '编译' - - go env -w GO111MODULE='on' - - go env - if [ "$GOMODTIDY" == 1 ]; then go mod tidy; fi From e1f8b98cfdd6577ec778ab95e1c85ef389dcddac Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 6 Nov 2024 10:43:42 +0800 Subject: [PATCH 26/26] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a55ae0c..0e529e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,9 +6,9 @@ stages: - unlock variables: - ProjectPath: "mongo.games.com/game" - BetaBinPath: "/home/game/" - DevelopBinPath: "/home/game/" + ProjectPath: "mongo.games.com/game" # 项目相对于GOPATH的路径 + BetaBinPath: "/home/game/" # beta环境部署路径 + DevelopBinPath: "/home/game/" # develop环境部署路径 default: tags: