优化item代码
This commit is contained in:
parent
e40f849605
commit
27dbb36ee6
@ -18,6 +18,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ItemsGetlistReq)
|
||||
err error
|
||||
items []*pb.DB_UserItemData
|
||||
nt int64
|
||||
temp []*pb.DB_UserItemData
|
||||
grids []*pb.DB_UserItemData
|
||||
modifys []*pb.DB_UserItemData
|
||||
dels []*pb.DB_UserItemData
|
||||
@ -39,6 +40,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ItemsGetlistReq)
|
||||
return
|
||||
} else {
|
||||
// tempgrids = this.module.configure.GetPackItemByType(items, req.IType)
|
||||
temp = make([]*pb.DB_UserItemData, 0, len(items))
|
||||
modifys = make([]*pb.DB_UserItemData, 0, len(items))
|
||||
dels = make([]*pb.DB_UserItemData, 0, len(items))
|
||||
grids = make([]*pb.DB_UserItemData, 0, len(items))
|
||||
@ -53,10 +55,11 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ItemsGetlistReq)
|
||||
temp.IsNewItem = false
|
||||
modifys = append(modifys, &temp)
|
||||
}
|
||||
temp = append(temp, v)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ItemsGetlistResp{Grids: items})
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ItemsGetlistResp{Grids: temp})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user