新版邀请活动

This commit is contained in:
sk 2024-06-26 14:10:27 +08:00
parent 5058d2aba1
commit e0f2f76322
11 changed files with 82 additions and 61 deletions

Binary file not shown.

View File

@ -2512,8 +2512,8 @@
1 1
], ],
"Classify": [ "Classify": [
0, 1,
0, 1,
0 0
], ],
"Type": 17, "Type": 17,
@ -2540,8 +2540,8 @@
1 1
], ],
"Classify": [ "Classify": [
0, 1,
0, 1,
0 0
], ],
"Type": 17, "Type": 17,
@ -2568,8 +2568,8 @@
1 1
], ],
"Classify": [ "Classify": [
0, 1,
0, 1,
0 0
], ],
"Type": 17, "Type": 17,
@ -2596,8 +2596,8 @@
1 1
], ],
"Classify": [ "Classify": [
0, 1,
0, 1,
0 0
], ],
"Type": 17, "Type": 17,

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -18,6 +18,8 @@ func DbShopLogCollection(plt string) *mongo.Collection {
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"pageid"}, Background: true, Sparse: true}) dbShopRec.EnsureIndex(mgo.Index{Key: []string{"pageid"}, Background: true, Sparse: true})
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"state"}, Background: true, Sparse: true}) dbShopRec.EnsureIndex(mgo.Index{Key: []string{"state"}, Background: true, Sparse: true})
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"shopid"}, Background: true, Sparse: true}) dbShopRec.EnsureIndex(mgo.Index{Key: []string{"shopid"}, Background: true, Sparse: true})
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
} }
return dbShopRec return dbShopRec
} }

2
public

@ -1 +1 @@
Subproject commit b3c639ba6fbdb6ee41e21a8b96901a179db031af Subproject commit 58438743032d93fc2e16d705c4ebe1df5c33f1b2

View File

@ -3848,66 +3848,73 @@ func (this *Player) GetPayGoodsInfo() {
if data != nil { if data != nil {
infos := data.([]*model.DbShop) infos := data.([]*model.DbShop)
for _, info := range infos { for _, info := range infos {
var itemInfo []*player_proto.PayItem switch info.PageId {
var items []*Item case ShopPageBackend:
if len(info.Amount) > 0 { logger.Logger.Tracef("GetPayGoodsInfo ShopPageBackend %+v", *info)
this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark) default:
this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark) var itemInfo []*player_proto.PayItem
} var items []*Item
this.AddMoneyPayTotal(int64(info.ConsumeNum)) if len(info.Amount) > 0 {
if info.ItemInfo != nil { this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark)
for _, v := range info.ItemInfo { this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark)
items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
itemInfo = append(itemInfo, &player_proto.PayItem{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
} }
} this.AddMoneyPayTotal(int64(info.ConsumeNum))
switch info.Remark { if info.ItemInfo != nil {
case "BlindBox": for _, v := range info.ItemInfo {
if len(info.OtherParams) > 0 { items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
this.WelfData.BlindBoxId = info.OtherParams[0] itemInfo = append(itemInfo, &player_proto.PayItem{
} else { ItemId: v.ItemId,
logger.Logger.Errorf("GetPayGoodsInfo BlindBox OtherParams is nil") ItemNum: v.ItemNum,
})
}
} }
case "FirstRecharge": switch info.Remark {
if len(info.OtherParams) > 0 { case "BlindBox":
if len(info.OtherParams) > 0 {
this.WelfData.BlindBoxId = info.OtherParams[0]
} else {
logger.Logger.Errorf("GetPayGoodsInfo BlindBox OtherParams is nil")
}
case "FirstRecharge":
if len(info.OtherParams) > 0 {
this.WelfData.FirstPayDay = info.OtherParams[0] this.WelfData.FirstPayDay = info.OtherParams[0]
this.WelfData.FirstPayTickets = info.Ts this.WelfData.FirstPayTickets = info.Ts
} else { } else {
logger.Logger.Errorf("GetPayGoodsInfo FirstRecharge OtherParams is nil") logger.Logger.Errorf("GetPayGoodsInfo FirstRecharge OtherParams is nil")
}
case "ContinuousPay":
if len(info.OtherParams) > 0 {
this.WelfData.ContinuousPayDay = info.OtherParams[0]
this.WelfData.ContinuousPayTickets = info.Ts
} else {
logger.Logger.Errorf("GetPayGoodsInfo ContinuousPay OtherParams is nil")
}
} }
case "ContinuousPay": this.UpdatePlayerVipBag(info.ShopId)
if len(info.OtherParams) > 0 { this.UpdateShopID(info.ShopId)
this.WelfData.ContinuousPayDay = info.OtherParams[0] this.dirty = true
this.WelfData.ContinuousPayTickets = info.Ts this.SendDiffData()
} else {
logger.Logger.Errorf("GetPayGoodsInfo ContinuousPay OtherParams is nil") info.Amount[2] = this.GetVIPExpByPay(info.ConsumeNum)
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)
PayGoodsInfo := &player_proto.SCPayGoodsInfo{
Gold: info.Amount,
Item: itemInfo,
} }
proto.SetDefaults(PayGoodsInfo)
this.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_PAYGOODSINFO), PayGoodsInfo)
} }
this.UpdatePlayerVipBag(info.ShopId) if info.ConsumeNum > 0 {
this.UpdateShopID(info.ShopId) TaskSubjectSingleton.Touch(common.TaskTypePay, &TaskData{
SnId: this.SnId,
this.dirty = true Num: int64(info.ConsumeNum),
this.SendDiffData() })
info.Amount[2] = this.GetVIPExpByPay(info.ConsumeNum)
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)
PayGoodsInfo := &player_proto.SCPayGoodsInfo{
Gold: info.Amount,
Item: itemInfo,
} }
proto.SetDefaults(PayGoodsInfo)
this.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_PAYGOODSINFO), PayGoodsInfo)
TaskSubjectSingleton.Touch(common.TaskTypePay, &TaskData{
SnId: this.SnId,
Num: int64(info.ConsumeNum),
})
} }
} }

View File

@ -51,6 +51,7 @@ const (
ShopPagePhoneScoreGoogle = 62 ShopPagePhoneScoreGoogle = 62
ShopPageGift = 7 //礼包页面 ShopPageGift = 7 //礼包页面
ShopPageDiamondBank = 8 //钻石存储罐 ShopPageDiamondBank = 8 //钻石存储罐
ShopPageBackend = 9 //并不是页面,是后台加币记录类型
) )
// 商品类型 // 商品类型

View File

@ -1772,6 +1772,17 @@ func init() {
logger.Logger.Errorf("model.UpdatePlayerCoin err:%v.", err) logger.Logger.Errorf("model.UpdatePlayerCoin err:%v.", err)
return nil return nil
} }
// 充值金额记录
if money > 0 {
err = model.InsertDbShopLog(model.NewDbShop(findPlayer.Platform, ShopPageBackend, nil, "", 0, 0, int32(money),
0, nil, 0, "", findPlayer.SnId, 3, "后台离线加币", nil))
if err != nil {
logger.Logger.Errorf("model.InsertDbShopLog err:%v.", err)
return nil
}
}
//账变记录 //账变记录
err = model.InsertCoinLog(coinlogex) err = model.InsertCoinLog(coinlogex)
if err != nil { if err != nil {

Binary file not shown.