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 0891821..74de92f 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -3185,7 +3185,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{} {