Compare commits
No commits in common. "a7a25ef0282ab9428dffe0446fce08b9f063e387" and "e318c85c265ca228b18067c9e3a086dc04123b8f" have entirely different histories.
a7a25ef028
...
e318c85c26
|
@ -2,6 +2,7 @@ package svc
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
|
@ -24,33 +25,67 @@ func AwardLogCollection(plt string) *mongo.Collection {
|
|||
return nil
|
||||
}
|
||||
|
||||
func FetchAwardLog(plt string) (recs model.AwardLog, err error) {
|
||||
err = AwardLogCollection(plt).Find(bson.M{}).One(&recs)
|
||||
func InsertAwardLog(logs ...*model.AwardLog) (err error) {
|
||||
clog := AwardLogCollection(logs[0].Platform)
|
||||
if clog == nil {
|
||||
return
|
||||
}
|
||||
switch len(logs) {
|
||||
case 0:
|
||||
return errors.New("no data")
|
||||
case 1:
|
||||
err = clog.Insert(logs[0])
|
||||
if err != nil {
|
||||
logger.Logger.Info("svc.UpdateAllPlayerPackageTag error ", err)
|
||||
return
|
||||
}
|
||||
default:
|
||||
docs := make([]interface{}, 0, len(logs))
|
||||
for _, log := range logs {
|
||||
docs = append(docs, log)
|
||||
}
|
||||
err = clog.Insert(docs...)
|
||||
}
|
||||
if err != nil {
|
||||
logger.Logger.Warn("InsertAwardLog error:", err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func FetchAwardLog(plt string) (recs []model.AwardLog, err error) {
|
||||
err = AwardLogCollection(plt).Find(bson.M{}).All(&recs)
|
||||
return
|
||||
}
|
||||
|
||||
type AwardLogSvc struct {
|
||||
}
|
||||
|
||||
func (svc *AwardLogSvc) FetchAwardLog(args *model.FetchAwardLogArgs, ret *model.AwardLog) (err error) {
|
||||
*ret, err = FetchAwardLog(args.Plt)
|
||||
func (svc *AwardLogSvc) InsertAwardLog(args []*model.AwardLog, ret *bool) (err error) {
|
||||
err = InsertAwardLog(args...)
|
||||
if err == nil {
|
||||
*ret = true
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (svc *AwardLogSvc) FetchAwardLog(args *model.FetchAwardLogArgs, ret *[]model.AwardLog) (err error) {
|
||||
*ret, err = FetchAwardLog(args.Plt)
|
||||
return
|
||||
}
|
||||
func (svc *AwardLogSvc) UpsertAwardLog(args *model.FetchAwardLogArgs, ret *model.AwardLog) error {
|
||||
cc := AwardLogCollection(args.Plt)
|
||||
if cc == nil {
|
||||
return AwardLogDBErr
|
||||
return ChatColError
|
||||
}
|
||||
_, err := cc.Upsert(bson.M{}, args.Data)
|
||||
if err != nil {
|
||||
logger.Logger.Error("UpsertAwardLog is err: ", err)
|
||||
_, err := cc.Upsert(bson.M{"platform": args.Plt}, args.Data)
|
||||
if err != nil && err != mgo.ErrNotFound {
|
||||
logger.Logger.Error("UpsertChat is err: ", err)
|
||||
return err
|
||||
}
|
||||
ret = args.Data
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
rpc.Register(new(AwardLogSvc))
|
||||
}
|
||||
|
|
|
@ -8,8 +8,9 @@ import (
|
|||
)
|
||||
|
||||
type AwardLog struct {
|
||||
AwardMap map[int32]int64 //key1:1话费 2实物 key2 itemId value:数量
|
||||
Ts int64
|
||||
Platform string
|
||||
AwardMap map[int32]map[int32]int32 //key1:1话费 2实物 key2 itemId value:数量
|
||||
Ts time.Time
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -17,6 +18,14 @@ var (
|
|||
AwardLogCollName = "log_award"
|
||||
)
|
||||
|
||||
func InsertAwardLog(logs ...*AwardLog) (err error) {
|
||||
if rpcCli == nil {
|
||||
return ErrRPClientNoConn
|
||||
}
|
||||
var ret bool
|
||||
return rpcCli.CallWithTimeout("AwardLogSvc.InsertAwardLog", logs, &ret, time.Second*30)
|
||||
}
|
||||
|
||||
type FetchAwardLogArgs struct {
|
||||
Plt string
|
||||
Data *AwardLog
|
||||
|
@ -25,9 +34,9 @@ type AwardLogRes struct {
|
|||
Data *AwardLog
|
||||
}
|
||||
|
||||
func FetchAwardLog(plt string) (recs AwardLog, err error) {
|
||||
func FetchAwardLog(plt string) (recs []AwardLog, err error) {
|
||||
if rpcCli == nil {
|
||||
return recs, ErrRPClientNoConn
|
||||
return nil, ErrRPClientNoConn
|
||||
}
|
||||
args := &FetchAwardLogArgs{
|
||||
Plt: plt,
|
||||
|
@ -38,7 +47,7 @@ func FetchAwardLog(plt string) (recs AwardLog, err error) {
|
|||
|
||||
func UpsertAwardLog(platform string, data *AwardLog) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.UpsertAwardLog rpcCli == nil")
|
||||
logger.Logger.Error("model.UpsertApplyList rpcCli == nil")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/protocol/shop"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -134,8 +134,6 @@ type AllConfig struct {
|
|||
*webapi.RankTypeConfig
|
||||
//获奖记录配置
|
||||
*webapi.AwardLogConfig
|
||||
// 获得道具总数
|
||||
AwardItem AwardLog
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
@ -357,12 +355,3 @@ func (cm *ConfigMgr) GetSkinSkillMaxLevel(plt string, skinId int32) int32 {
|
|||
}
|
||||
return level
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) AddAwardItem(plt string, id int32, num int64) {
|
||||
cfg := cm.GetConfig(plt).AwardItem
|
||||
if cfg.AwardMap == nil {
|
||||
cfg.AwardMap = make(map[int32]int64)
|
||||
}
|
||||
cfg.AwardMap[id] += num
|
||||
cfg.Ts = time.Now().Unix()
|
||||
}
|
||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit 06d6be8fa6d928f7eb30a4c567abfc43e571cbc4
|
||||
Subproject commit d789cca81a36ddbaf30e5414b6c4fe530e0631f6
|
|
@ -2900,9 +2900,9 @@ func CSAwardLog(s *netlib.Session, packetId int, data interface{}, sid int64) er
|
|||
if !ok {
|
||||
return nil
|
||||
}
|
||||
awardLogConfig := PlatformMgrSingleton.GetConfig(p.Platform).AwardLogConfig
|
||||
awardLogConfig := PlatformMgrSingleton.GetConfig("1").AwardLogConfig
|
||||
|
||||
AwardLog := AwardLogMgr.GetAwardLog(p.Platform, msg.TypeId)
|
||||
AwardLog := AwardLogMgr.GetAwardLog(msg.TypeId)
|
||||
ret := &player_proto.SCAwardLog{}
|
||||
awardData := &player_proto.AwardLogData{}
|
||||
ret.TypeId = msg.TypeId
|
||||
|
@ -2943,7 +2943,7 @@ func CSAwardLog(s *netlib.Session, packetId int, data interface{}, sid int64) er
|
|||
}
|
||||
ret.AwardLog = awardData
|
||||
//实时播报数据
|
||||
AnnouncerLog := AwardLogMgr.GetAnnouncerLog(p.Platform, msg.TypeId)
|
||||
AnnouncerLog := AwardLogMgr.GetAnnouncerLog(msg.TypeId)
|
||||
for _, logInfo := range AnnouncerLog {
|
||||
infoData := &player_proto.AnnouncerLogInfo{}
|
||||
//infoData.Snid = logInfo.Snid
|
||||
|
|
|
@ -1,123 +1,88 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/srvdata"
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
"mongo.games.com/goserver/core/task"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/module"
|
||||
)
|
||||
|
||||
type AwardLogManager struct {
|
||||
BaseClockSinker
|
||||
AnnouncerLog map[string]map[int32][]model.AnnouncerLog //key:1话费 2实物
|
||||
AwardMap map[int32]map[int32]int32 //key1:1话费 2实物 key2 itemId value:数量
|
||||
AnnouncerLog map[int32][]model.AnnouncerLog //key:1话费 2实物
|
||||
}
|
||||
|
||||
var AwardLogMgr = &AwardLogManager{
|
||||
AnnouncerLog: make(map[string]map[int32][]model.AnnouncerLog),
|
||||
}
|
||||
var AwardLogMgr = &AwardLogManager{}
|
||||
|
||||
func (this *AwardLogManager) ModuleName() string {
|
||||
return "AwardLogManager"
|
||||
}
|
||||
|
||||
// GetAwardLog 获取总数量
|
||||
// typeId 1 话费 2实物
|
||||
func (this *AwardLogManager) GetAwardLog(plt string, typeId int32) map[int32]int64 {
|
||||
d := PlatformMgrSingleton.GetConfig(plt).AwardItem
|
||||
ret := make(map[int32]int64)
|
||||
// 1 话费 2实物
|
||||
switch typeId {
|
||||
case 1:
|
||||
|
||||
case 2:
|
||||
for _, v := range srvdata.GameItemMgr.GetArr(plt) {
|
||||
if v.GetType() == common.ItemTypeObjective {
|
||||
if d.AwardMap[v.GetId()] > 0 {
|
||||
ret[v.GetId()] += d.AwardMap[v.GetId()]
|
||||
}
|
||||
}
|
||||
func (this *AwardLogManager) GetAwardLog(typeId int32) map[int32]int32 {
|
||||
return this.AwardMap[typeId]
|
||||
}
|
||||
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (this *AwardLogManager) GetAnnouncerLog(plt string, typeId int32) []model.AnnouncerLog {
|
||||
data := this.AnnouncerLog[plt]
|
||||
if data == nil {
|
||||
data = make(map[int32][]model.AnnouncerLog)
|
||||
this.AnnouncerLog[plt] = data
|
||||
}
|
||||
log := data[typeId]
|
||||
func (this *AwardLogManager) GetAnnouncerLog(typeId int32) []model.AnnouncerLog {
|
||||
log := this.AnnouncerLog[typeId]
|
||||
if len(log) > 100 {
|
||||
return log[len(log)-100:]
|
||||
}
|
||||
return log
|
||||
return this.AnnouncerLog[typeId]
|
||||
}
|
||||
|
||||
// 已兑换数据
|
||||
func (this *AwardLogManager) UpdateAwardLog(plt string, itemId int32, num int64) {
|
||||
PlatformMgrSingleton.AddAwardItem(plt, itemId, num)
|
||||
func (this *AwardLogManager) UpdateAwardLog(itemId, num, itemType int32) {
|
||||
typeID := int32(1)
|
||||
if itemType == 16 {
|
||||
typeID = 2
|
||||
}
|
||||
if this.AwardMap == nil {
|
||||
this.AwardMap = make(map[int32]map[int32]int32)
|
||||
}
|
||||
if this.AwardMap[typeID] == nil {
|
||||
this.AwardMap[typeID] = make(map[int32]int32)
|
||||
}
|
||||
|
||||
this.AwardMap[typeID][itemId] += num
|
||||
logger.Logger.Trace("更新已兑换数据数据 this.AwardMap = ", this.AwardMap)
|
||||
this.Save()
|
||||
}
|
||||
|
||||
// 实时播报数据
|
||||
func (this *AwardLogManager) UpdateAnnouncerLog(data model.AnnouncerLog) {
|
||||
data.Ts = time.Now()
|
||||
if this.AnnouncerLog == nil {
|
||||
this.AnnouncerLog = make(map[string]map[int32][]model.AnnouncerLog)
|
||||
this.AnnouncerLog = make(map[int32][]model.AnnouncerLog)
|
||||
}
|
||||
if this.AnnouncerLog[data.Platform] == nil {
|
||||
this.AnnouncerLog[data.Platform] = make(map[int32][]model.AnnouncerLog)
|
||||
}
|
||||
this.AnnouncerLog[data.Platform][data.TypeId] = append(this.AnnouncerLog[data.Platform][data.TypeId], data)
|
||||
if len(this.AnnouncerLog[data.Platform][data.TypeId]) > 100 {
|
||||
this.AnnouncerLog[data.Platform][data.TypeId] = this.AnnouncerLog[data.Platform][data.TypeId][len(this.AnnouncerLog[data.Platform][data.TypeId])-100:]
|
||||
}
|
||||
|
||||
this.AnnouncerLog[data.TypeId] = append(this.AnnouncerLog[data.TypeId], data)
|
||||
logger.Logger.Trace("更新实时播报数据 this.AnnouncerLog = ", this.AnnouncerLog)
|
||||
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
data.Ts = time.Now()
|
||||
err := model.InsertAnnouncerLog(&data)
|
||||
if err != nil {
|
||||
logger.Logger.Error("UpdateAnnouncerLog InsertAnnouncerLog err :", err)
|
||||
}
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
}), "save_announcer").Start()
|
||||
}
|
||||
|
||||
func (this *AwardLogManager) Init() {
|
||||
for _, v := range PlatformMgrSingleton.platforms {
|
||||
if v != nil {
|
||||
// 获取道具获得总数
|
||||
res, err := model.FetchAwardLog(v.IdStr)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("fetch award log error: %v", err)
|
||||
} else {
|
||||
PlatformMgrSingleton.GetConfig(v.IdStr).AwardItem = res
|
||||
}
|
||||
// 获取实时播报数据
|
||||
arr, err := model.FetchAnnouncerLog(v.IdStr)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("fetch announcer log error: %v", err)
|
||||
} else {
|
||||
for _, v := range arr {
|
||||
if this.AnnouncerLog[v.Platform] == nil {
|
||||
this.AnnouncerLog[v.Platform] = make(map[int32][]model.AnnouncerLog)
|
||||
}
|
||||
if this.AnnouncerLog[v.Platform][v.TypeId] == nil {
|
||||
this.AnnouncerLog[v.Platform][v.TypeId] = make([]model.AnnouncerLog, 0)
|
||||
}
|
||||
this.AnnouncerLog[v.Platform][v.TypeId] = append(this.AnnouncerLog[v.Platform][v.TypeId], v)
|
||||
//初始化数据
|
||||
this.AwardMap = make(map[int32]map[int32]int32)
|
||||
this.AnnouncerLog = make(map[int32][]model.AnnouncerLog)
|
||||
AwardMap, err := model.FetchAwardLog("1")
|
||||
if err == nil {
|
||||
for _, log := range AwardMap {
|
||||
this.AwardMap = log.AwardMap
|
||||
}
|
||||
}
|
||||
AnnouncerLog, err := model.FetchAnnouncerLog("1")
|
||||
if err == nil {
|
||||
for _, log := range AnnouncerLog {
|
||||
this.AnnouncerLog[log.TypeId] = append(this.AnnouncerLog[log.TypeId], log)
|
||||
}
|
||||
}
|
||||
logger.Logger.Tracef("AwardLog初始化数据 this.AwardMap = %v,this.AnnouncerLog = %v", this.AwardMap, this.AnnouncerLog)
|
||||
}
|
||||
|
||||
func (this *AwardLogManager) Update() {
|
||||
|
@ -129,21 +94,25 @@ func (this *AwardLogManager) Shutdown() {
|
|||
|
||||
func (this *AwardLogManager) OnHourTimer() {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
this.Save()
|
||||
awardData := &model.AwardLog{}
|
||||
awardData.Platform = "1"
|
||||
awardData.AwardMap = this.AwardMap
|
||||
awardData.Ts = time.Now()
|
||||
model.UpsertAwardLog("1", awardData)
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
}), "save_awarditem").Start()
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
|
||||
})).StartByFixExecutor("AwardLogTask")
|
||||
}
|
||||
|
||||
func (this *AwardLogManager) Save() {
|
||||
for _, v := range PlatformMgrSingleton.platforms {
|
||||
if v != nil {
|
||||
model.UpsertAwardLog(v.IdStr, &PlatformMgrSingleton.GetConfig(v.IdStr).AwardItem)
|
||||
}
|
||||
}
|
||||
awardData := &model.AwardLog{}
|
||||
awardData.Platform = "1"
|
||||
awardData.AwardMap = this.AwardMap
|
||||
awardData.Ts = time.Now()
|
||||
model.UpsertAwardLog("1", awardData)
|
||||
}
|
||||
|
||||
func init() {
|
||||
module.RegisteModule(AwardLogMgr, time.Hour, 0)
|
||||
module.RegisteModule(AwardLogMgr, time.Minute*3, 0)
|
||||
ClockMgrSington.RegisteSinker(AwardLogMgr)
|
||||
}
|
||||
|
|
|
@ -327,30 +327,6 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int
|
|||
LogChannelSingleton.WriteLog(log)
|
||||
logId = log.LogId.Hex()
|
||||
}
|
||||
//获奖记录log
|
||||
if logType == ItemObtain && v.ItemNum > 0 {
|
||||
AwardLogMgr.UpdateAwardLog(p.Platform, item.Id, v.ItemNum)
|
||||
|
||||
awardLogType := 0
|
||||
if item.Type == common.ItemTypeChange {
|
||||
//话费
|
||||
awardLogType = 1
|
||||
} else if item.Type == common.ItemTypeObjective {
|
||||
//实物
|
||||
awardLogType = 2
|
||||
}
|
||||
if awardLogType != 0 {
|
||||
data := model.AnnouncerLog{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
Name: p.Name,
|
||||
Phone: p.Tel,
|
||||
ItemId: item.Id, //获得物品ID
|
||||
TypeId: int32(awardLogType),
|
||||
}
|
||||
AwardLogMgr.UpdateAnnouncerLog(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if v.ItemId == common.ItemIDWeekScore && v.ItemNum > 0 {
|
||||
|
@ -382,6 +358,28 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int
|
|||
if v.ItemId == common.ItemIDLong && v.ItemNum > 0 {
|
||||
long += v.ItemNum
|
||||
}
|
||||
//获奖记录log
|
||||
if v.ItemNum > 0 && (item.Type == common.ItemTypeChange || item.Type == common.ItemTypeObjective) {
|
||||
awardLogType := 1
|
||||
if item.Type == common.ItemTypeChange {
|
||||
//话费
|
||||
awardLogType = 1
|
||||
} else if item.Type == common.ItemTypeObjective {
|
||||
//实物
|
||||
awardLogType = 2
|
||||
//实物进背包就算已兑换
|
||||
AwardLogMgr.UpdateAwardLog(item.Id, int32(v.ItemNum), item.Type)
|
||||
}
|
||||
data := model.AnnouncerLog{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
Name: p.Name,
|
||||
Phone: p.Tel,
|
||||
ItemId: item.Id, //获得物品ID
|
||||
TypeId: int32(awardLogType),
|
||||
}
|
||||
AwardLogMgr.UpdateAnnouncerLog(data)
|
||||
}
|
||||
}
|
||||
|
||||
if len(changeItems) > 0 {
|
||||
|
@ -500,18 +498,17 @@ func (this *BagMgr) AddItemsOffline(platform string, snid int32, addItems []*Ite
|
|||
}
|
||||
|
||||
//获奖记录log
|
||||
if logType == ItemObtain && v.ItemNum > 0 {
|
||||
AwardLogMgr.UpdateAwardLog(findPlayer.Platform, itemData.Id, v.ItemNum)
|
||||
|
||||
awardLogType := 0
|
||||
if v.ItemNum > 0 && (itemData.Type == common.ItemTypeChange || itemData.Type == common.ItemTypeObjective) {
|
||||
awardLogType := 1
|
||||
if itemData.Type == common.ItemTypeChange {
|
||||
//话费
|
||||
awardLogType = 1
|
||||
} else if itemData.Type == common.ItemTypeObjective {
|
||||
//实物
|
||||
awardLogType = 2
|
||||
//实物进背包就算已兑换
|
||||
AwardLogMgr.UpdateAwardLog(itemData.Id, int32(v.ItemNum), itemData.Type)
|
||||
}
|
||||
if awardLogType > 0 {
|
||||
logData := model.AnnouncerLog{
|
||||
Platform: findPlayer.Platform,
|
||||
Snid: findPlayer.SnId,
|
||||
|
@ -523,7 +520,6 @@ func (this *BagMgr) AddItemsOffline(platform string, snid int32, addItems []*Ite
|
|||
AwardLogMgr.UpdateAnnouncerLog(logData)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
callback(errors.New("AddItemsOffline failed"))
|
||||
}
|
||||
|
@ -761,8 +757,8 @@ func (this *BagMgr) ItemExchangeCard(p *Player, itemId int32, money, cardType in
|
|||
if p != nil {
|
||||
p.AddMessage(newMsg)
|
||||
//已兑换log
|
||||
//itemData := srvdata.GameItemMgr.Get(p.Platform, itemId)
|
||||
//AwardLogMgr.UpdateAwardLog(itemData.Id, int32(1), itemData.Type)
|
||||
itemData := srvdata.GameItemMgr.Get(p.Platform, itemId)
|
||||
AwardLogMgr.UpdateAwardLog(itemData.Id, int32(1), itemData.Type)
|
||||
}
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_SC_ITEM_EXCHANGE_RES), pack)
|
||||
}), fmt.Sprintf("ItemExChange%d", p.SnId)).Start()
|
||||
|
|
|
@ -924,7 +924,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
}*/
|
||||
item := srvdata.GameItemMgr.Get(p.Platform, cdata.ItemId)
|
||||
//已兑换记录
|
||||
//AwardLogMgr.UpdateAwardLog(item.Id, int32(1), item.Type)
|
||||
AwardLogMgr.UpdateAwardLog(item.Id, int32(1), item.Type)
|
||||
awardLog := model.AnnouncerLog{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
|
@ -940,7 +940,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
item := srvdata.GameItemMgr.Get(p.Platform, cdata.ItemId)
|
||||
if item.Type == common.ItemTypeObjective {
|
||||
//已兑换记录
|
||||
//AwardLogMgr.UpdateAwardLog(item.Id, int32(1), item.Type)
|
||||
AwardLogMgr.UpdateAwardLog(item.Id, int32(1), item.Type)
|
||||
awardLog := model.AnnouncerLog{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
|
|
Loading…
Reference in New Issue