From 7876fa34f996af1797fb35123986884046e0f319 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 2 Jan 2025 11:47:00 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=BA=A2=E5=8C=85=E6=B4=BB=E5=8A=A8?= =?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 | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index fd7125f..1c495ca 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -112,6 +112,99 @@ func init() { etcd.Register(etcd.ETCDKEY_PigBankProp, webapi.GamePigBankPropConfig{}, platformConfigEvent) // 红包配置 etcd.Register(etcd.ETCDKEY_REDPACKET, webapi.RedPacketConfig{}, platformConfigEvent) + + WelfareMgrSington.UpdateRedPacket(&webapi.RedPacketConfig{ + Platform: "1", + List: []*webapi.RedPacketInfo{ + { + Id: 1, + On: 1, + StartHMS: 90000, + EndHMS: 100000, + StayTs: 0, + MaxCount: 100, + LessCount: 5, + ItemId: 100001, + TotalNum: 100000, + RedList: []*webapi.RedInfo{ + { + Num: 1, + Rate: 50, + }, + { + Num: 10, + Rate: 10, + }, + { + Num: 20, + Rate: 10, + }, + { + Num: 30, + Rate: 10, + }, + }, + }, + { + Id: 2, + On: 1, + StartHMS: 100000, + EndHMS: 120000, + StayTs: 30, + MaxCount: 10000, + LessCount: 5, + ItemId: 100001, + TotalNum: 100000, + RedList: []*webapi.RedInfo{ + { + Num: 1, + Rate: 50, + }, + { + Num: 10, + Rate: 10, + }, + { + Num: 20, + Rate: 10, + }, + { + Num: 30, + Rate: 10, + }, + }, + }, + { + Id: 3, + On: 1, + StartHMS: 120000, + EndHMS: 180000, + StayTs: 0, + MaxCount: 10000, + LessCount: 5, + ItemId: 100001, + TotalNum: 100000, + RedList: []*webapi.RedInfo{ + { + Num: 1, + Rate: 50, + }, + { + Num: 10, + Rate: 10, + }, + { + Num: 20, + Rate: 10, + }, + { + Num: 30, + Rate: 10, + }, + }, + }, + }, + }, false) } func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {