上传背包查询接口
This commit is contained in:
parent
bdefb36245
commit
f013b29dc9
@ -67,6 +67,8 @@ type (
|
|||||||
QueryItemAmount(uId string, itemid string) (amount uint32)
|
QueryItemAmount(uId string, itemid string) (amount uint32)
|
||||||
//查询用户背包多个物品数量
|
//查询用户背包多个物品数量
|
||||||
QueryItemsAmount(uId string, itemid ...string) (result map[string]uint32)
|
QueryItemsAmount(uId string, itemid ...string) (result map[string]uint32)
|
||||||
|
//查询用户背包
|
||||||
|
QueryUserPack(uId string) (itmes []*pb.DB_UserItemData, errdata *pb.ErrorData)
|
||||||
///添加单个物品到背包 (可以加物品和减物品)
|
///添加单个物品到背包 (可以加物品和减物品)
|
||||||
AddItem(session IUserSession, itemid string, addnum int32, bPush bool) (errdata *pb.ErrorData)
|
AddItem(session IUserSession, itemid string, addnum int32, bPush bool) (errdata *pb.ErrorData)
|
||||||
///添加多个物品到背包 (可以加物品和减物品)
|
///添加多个物品到背包 (可以加物品和减物品)
|
||||||
|
@ -88,6 +88,22 @@ func (this *Items) QueryItemsAmount(uId string, itemid ...string) (result map[st
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /查询用户背包物品数量
|
||||||
|
func (this *Items) QueryUserPack(uId string) (itmes []*pb.DB_UserItemData, errdata *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
itmes, err = this.modelItems.QueryUserPack(uId)
|
||||||
|
if err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.String(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (this *Items) AddItemforGrid(session comm.IUserSession, gridid string, addnum int32, bPush bool) (errdata *pb.ErrorData) {
|
func (this *Items) AddItemforGrid(session comm.IUserSession, gridid string, addnum int32, bPush bool) (errdata *pb.ErrorData) {
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
|
Loading…
Reference in New Issue
Block a user