Compare commits
No commits in common. "b5aba457a0e4c44a70b791641e1de2b0fba64fab" and "1c6706d014087dd80d931d99100c4256b4377910" have entirely different histories.
b5aba457a0
...
1c6706d014
|
@ -1,7 +1,6 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
|
@ -114,10 +113,10 @@ func GetMoneyTotal(platform string, snid int32) int64 {
|
|||
}
|
||||
tc := new(m)
|
||||
err = c.Pipe([]bson.M{
|
||||
{"$match": bson.M{"snid": snid, "state": 1, "consumetypenum": bson.M{"$gt": 0}}},
|
||||
{"$group": bson.M{"_id": nil, "total": bson.M{"$sum": "$consumetypenum"}}},
|
||||
{"$match": bson.M{"snid": snid, "state": 1, "consumenum": bson.M{"$gt": 0}}},
|
||||
{"$group": bson.M{"_id": nil, "total": bson.M{"$sum": "$consumenum"}}},
|
||||
}).AllowDiskUse().One(tc)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetMoneyTotal error:", err)
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/rpc"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
|
@ -66,43 +65,40 @@ func GetItemCount(platform string, snid, id int32, tp int) (count int64) {
|
|||
{"$match": bson.M{"snid": snid, "logtype": 0, "itemid": id, "typeid": common.GainWay_Exchange}},
|
||||
{"$group": bson.M{"_id": nil, "count": bson.M{"$sum": "$count"}}},
|
||||
}).AllowDiskUse().One(tc)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
if err != nil {
|
||||
logger.Logger.Warn("GetItemCount swapN error:", err)
|
||||
return 0
|
||||
}
|
||||
swapN = tc.Count
|
||||
|
||||
// 比赛返回
|
||||
tc = new(m)
|
||||
err = c.Pipe([]bson.M{
|
||||
{"$match": bson.M{"snid": snid, "logtype": 0, "itemid": id, "typeid": common.GainWay_MatchSignup}},
|
||||
{"$group": bson.M{"_id": nil, "count": bson.M{"$sum": "$count"}}},
|
||||
}).AllowDiskUse().One(tc)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
if err != nil {
|
||||
logger.Logger.Warn("GetItemCount matchN error:", err)
|
||||
return 0
|
||||
}
|
||||
matchN = tc.Count
|
||||
|
||||
// 消耗总数量
|
||||
tc = new(m)
|
||||
err = c.Pipe([]bson.M{
|
||||
{"$match": bson.M{"snid": snid, "logtype": 1, "itemid": id}},
|
||||
{"$group": bson.M{"_id": nil, "count": bson.M{"$sum": "$count"}}},
|
||||
}).AllowDiskUse().One(tc)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
if err != nil {
|
||||
logger.Logger.Warn("GetItemCount costN error:", err)
|
||||
return 0
|
||||
}
|
||||
costN = tc.Count
|
||||
|
||||
// 获得总数量
|
||||
tc = new(m)
|
||||
err = c.Pipe([]bson.M{
|
||||
{"$match": bson.M{"snid": snid, "logtype": 0, "itemid": id}},
|
||||
{"$group": bson.M{"_id": nil, "count": bson.M{"$sum": "$count"}}},
|
||||
}).AllowDiskUse().One(tc)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
if err != nil {
|
||||
logger.Logger.Warn("GetItemCount gainN error:", err)
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -328,10 +328,6 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
return nil
|
||||
}
|
||||
|
||||
defer func() {
|
||||
logger.Logger.Debugf("Player Data: snid:%v VCardCost:%v MoneyTotal:%v", ret.Pd.SnId, ret.Pd.VCardCost, ret.Pd.MoneyTotal)
|
||||
}()
|
||||
|
||||
f := func(p *model.PlayerData) {
|
||||
// 更新一下绑定关系
|
||||
if p.PSnId > 0 && p.PCode != "" {
|
||||
|
@ -414,6 +410,7 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
if args.CorrectData && ret.Pd != nil {
|
||||
CorrectData(ret.Pd)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -708,8 +708,6 @@ func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData {
|
|||
pdfw.IsPermit = param.IsPermit
|
||||
pdfw.PermitScore = param.PermitScore
|
||||
pdfw.Long = param.Long
|
||||
pdfw.VCardCost = param.VCardCost
|
||||
pdfw.MoneyTotal = param.MoneyTotal
|
||||
return pdfw
|
||||
}
|
||||
func (this *PlayerData) IsMarkFlag(flag int) bool {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -205,8 +205,6 @@ message PlayerData{
|
|||
bool IsPermit = 56; // 是否已购买典藏通行证
|
||||
int64 Long = 57; // 龙币数量
|
||||
int64 PermitScore = 58; // 赛季通行证积分
|
||||
int64 VCardCost = 59; // v卡消耗
|
||||
int64 MoneyTotal = 60; // 充值总金额
|
||||
}
|
||||
|
||||
message RoomInfo{
|
||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit b99c38049f5744e9eda2860329a72fef4324520e
|
||||
Subproject commit 1869e4641809a14e9e5d025e303bdb56350a801c
|
|
@ -376,6 +376,7 @@ func (this *Player) OnLogined() {
|
|||
this.SendToRepSrv(this.PlayerData)
|
||||
//红点检测
|
||||
this.CheckShowRed()
|
||||
this.SCItems()
|
||||
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeLogin, &TaskData{SnId: this.SnId, Num: 1}) // 登录游戏
|
||||
|
||||
|
@ -3075,7 +3076,6 @@ func (this *Player) SendPlayerInfo() {
|
|||
if this.scene != nil && this.thrscene == 0 {
|
||||
this.SendGameConfig(int32(this.scene.gameId), this.Platform, this.Channel)
|
||||
}
|
||||
this.SCItems()
|
||||
//this.SendJackpotInfo()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue