新版邀请活动

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
],
"Classify": [
0,
0,
1,
1,
0
],
"Type": 17,
@ -2540,8 +2540,8 @@
1
],
"Classify": [
0,
0,
1,
1,
0
],
"Type": 17,
@ -2568,8 +2568,8 @@
1
],
"Classify": [
0,
0,
1,
1,
0
],
"Type": 17,
@ -2596,8 +2596,8 @@
1
],
"Classify": [
0,
0,
1,
1,
0
],
"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{"state"}, 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
}

2
public

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

View File

@ -3848,66 +3848,73 @@ func (this *Player) GetPayGoodsInfo() {
if data != nil {
infos := data.([]*model.DbShop)
for _, info := range infos {
var itemInfo []*player_proto.PayItem
var items []*Item
if len(info.Amount) > 0 {
this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark)
this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark)
}
this.AddMoneyPayTotal(int64(info.ConsumeNum))
if info.ItemInfo != nil {
for _, v := range info.ItemInfo {
items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
itemInfo = append(itemInfo, &player_proto.PayItem{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
switch info.PageId {
case ShopPageBackend:
logger.Logger.Tracef("GetPayGoodsInfo ShopPageBackend %+v", *info)
default:
var itemInfo []*player_proto.PayItem
var items []*Item
if len(info.Amount) > 0 {
this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark)
this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark)
}
}
switch info.Remark {
case "BlindBox":
if len(info.OtherParams) > 0 {
this.WelfData.BlindBoxId = info.OtherParams[0]
} else {
logger.Logger.Errorf("GetPayGoodsInfo BlindBox OtherParams is nil")
this.AddMoneyPayTotal(int64(info.ConsumeNum))
if info.ItemInfo != nil {
for _, v := range info.ItemInfo {
items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
itemInfo = append(itemInfo, &player_proto.PayItem{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
}
}
case "FirstRecharge":
if len(info.OtherParams) > 0 {
switch info.Remark {
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.FirstPayTickets = info.Ts
} else {
logger.Logger.Errorf("GetPayGoodsInfo FirstRecharge OtherParams is nil")
this.WelfData.FirstPayDay = info.OtherParams[0]
this.WelfData.FirstPayTickets = info.Ts
} else {
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":
if len(info.OtherParams) > 0 {
this.UpdatePlayerVipBag(info.ShopId)
this.UpdateShopID(info.ShopId)
this.WelfData.ContinuousPayDay = info.OtherParams[0]
this.WelfData.ContinuousPayTickets = info.Ts
} else {
logger.Logger.Errorf("GetPayGoodsInfo ContinuousPay OtherParams is nil")
this.dirty = true
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)
}
this.UpdatePlayerVipBag(info.ShopId)
this.UpdateShopID(info.ShopId)
this.dirty = true
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,
if info.ConsumeNum > 0 {
TaskSubjectSingleton.Touch(common.TaskTypePay, &TaskData{
SnId: this.SnId,
Num: int64(info.ConsumeNum),
})
}
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
ShopPageGift = 7 //礼包页面
ShopPageDiamondBank = 8 //钻石存储罐
ShopPageBackend = 9 //并不是页面,是后台加币记录类型
)
// 商品类型

View File

@ -1772,6 +1772,17 @@ func init() {
logger.Logger.Errorf("model.UpdatePlayerCoin err:%v.", err)
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)
if err != nil {

Binary file not shown.