From 6ac5d365d54f6d2b2c69a909ce53822dcf8d1bdf Mon Sep 17 00:00:00 2001 From: "DESKTOP-45ANQ2C\\unis" <179233648@qq.com> Date: Fri, 27 Sep 2024 14:30:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E5=8D=A1=E5=85=91=E6=8D=A2?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbproxy/svc/l_itemlog.go | 12 ++---------- model/itemdatalog.go | 14 +++++++++++--- worldsrv/action_player.go | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dbproxy/svc/l_itemlog.go b/dbproxy/svc/l_itemlog.go index 672f1f9..265e18c 100644 --- a/dbproxy/svc/l_itemlog.go +++ b/dbproxy/svc/l_itemlog.go @@ -124,15 +124,7 @@ func (svc *ItemLogSvc) GetClawdollItemLog(args *model.ClawdollItemLogReq, ret *m return } - type RetClawdollItemLog struct { - ItemId int32 //道具ID - Time int64 //时间 - TypeId int32 //道具记录类型 - Num int64 //数量 - LogType int32 //记录类型 0.获取 1.消耗 - } - - err = c.Find(cond).Limit(1000).Select(bson.M{"itemid": 1, "createts": 1, "typeid": 1, "count": 1, "logtype": 1}).All(&ret.Logs) + err = c.Find(cond).Select(bson.M{"itemid": 1, "createts": 1, "typeid": 1, "count": 1, "logtype": 1}).All(&ret.Logs) return } @@ -146,7 +138,7 @@ func (svc *ItemLogSvc) GetClawdollSuccessItemLog(args *model.ClawdollSuccessItem } var datas []model.ItemLog - err = c.Find(cond).Limit(1000).All(&datas) + err = c.Find(cond).All(&datas) if err != nil { logger.Logger.Error("GetClawdollSuccessItemLog error: ", err) return err diff --git a/model/itemdatalog.go b/model/itemdatalog.go index 953f086..9cf73e7 100644 --- a/model/itemdatalog.go +++ b/model/itemdatalog.go @@ -132,11 +132,19 @@ type ClawdollItemLogReq struct { TypeIds []int32 } -type GetClawdollItemLogRet struct { - Logs []ItemLog +type RetClawdollItemLog struct { + ItemId int32 //道具ID + CreateTs int64 //记录时间 + TypeId int32 // 变化类型 + Count int64 //个数 + LogType int32 //记录类型 0.获取 1.消耗 } -func GetClawdollItemLog(plt string, snid int32, typeIds []int32) (logs []ItemLog, err error) { +type GetClawdollItemLogRet struct { + Logs []RetClawdollItemLog +} + +func GetClawdollItemLog(plt string, snid int32, typeIds []int32) (logs []RetClawdollItemLog, err error) { if rpcCli == nil { logger.Logger.Error("model.GetClawdollItemLog rpcCli == nil") diff --git a/worldsrv/action_player.go b/worldsrv/action_player.go index ee7f409..fbdf145 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -3180,7 +3180,7 @@ func CSClawdollItemLog(s *netlib.Session, packetId int, data interface{}, sid in ret.TypeIds = append(ret.TypeIds, msg.TypeIds...) var err error - var ItemUseLogs []model.ItemLog + var ItemUseLogs []model.RetClawdollItemLog //娃娃机道具使用日志 task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {