上传协议名调整

This commit is contained in:
liwei1dao 2022-06-29 09:44:21 +08:00
parent 84b50e8a21
commit 9c697977da
6 changed files with 17 additions and 17 deletions

View File

@ -8,7 +8,7 @@ import (
)
//参数校验
func (this *apiComp) EquipCheck(session comm.IUserSession, req *pb.Equipment_Equip_Req) (result map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) EquipCheck(session comm.IUserSession, req *pb.EquipmentEquipReq) (result map[string]interface{}, code comm.ErrorCode) {
var (
err error
errorCode pb.ErrorCode
@ -46,7 +46,7 @@ func (this *apiComp) EquipCheck(session comm.IUserSession, req *pb.Equipment_Equ
}
///英雄挂在装备
func (this *apiComp) Equip(session comm.IUserSession, agrs map[string]interface{}, req *pb.Equipment_Equip_Req) (code pb.ErrorCode) {
func (this *apiComp) Equip(session comm.IUserSession, agrs map[string]interface{}, req *pb.EquipmentEquipReq) (code pb.ErrorCode) {
var (
err error
confs []*cfg.Game_equipData

View File

@ -7,20 +7,20 @@ import (
)
//参数校验
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.Equipment_GetList_Req) (result map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.EquipmentGetListReq) (result map[string]interface{}, code comm.ErrorCode) {
return
}
///获取用户装备列表
func (this *apiComp) Getlist(session comm.IUserSession, agrs map[string]interface{}, req *pb.Equipment_GetList_Req) (code pb.ErrorCode) {
func (this *apiComp) Getlist(session comm.IUserSession, agrs map[string]interface{}, req *pb.EquipmentGetListReq) (code pb.ErrorCode) {
var (
err error
items []*pb.DB_Equipment
)
defer func() {
if code == pb.ErrorCode_Success {
session.SendMsg(string(this.module.GetType()), "", &pb.Equipment_GetList_Resp{Equipments: items})
session.SendMsg(string(this.module.GetType()), "", &pb.EquipmentGetListResp{Equipments: items})
}
}()
if items, err = this.module.modelEquipment.QueryUserEquipments(session.GetUserId()); err != nil {

View File

@ -12,7 +12,7 @@ import (
)
//参数校验
func (this *apiComp) UpgradeCheck(session comm.IUserSession, req *pb.Equipment_Upgrade_Req) (result map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) UpgradeCheck(session comm.IUserSession, req *pb.EquipmentUpgradeReq) (result map[string]interface{}, code comm.ErrorCode) {
var (
err error
conf *cfg.Game_equipData
@ -49,7 +49,7 @@ func (this *apiComp) UpgradeCheck(session comm.IUserSession, req *pb.Equipment_U
}
///英雄挂在装备
func (this *apiComp) Upgrade(session comm.IUserSession, agrs map[string]interface{}, req *pb.Equipment_Upgrade_Req) (code pb.ErrorCode) {
func (this *apiComp) Upgrade(session comm.IUserSession, agrs map[string]interface{}, req *pb.EquipmentUpgradeReq) (code pb.ErrorCode) {
var (
err error
conf *cfg.Game_equipData
@ -61,7 +61,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, agrs map[string]interfac
)
defer func() {
if code == pb.ErrorCode_Success {
session.SendMsg(string(this.module.GetType()), "", &pb.Equipment_Upgrade_Resp{})
session.SendMsg(string(this.module.GetType()), "", &pb.EquipmentUpgradeResp{})
}
}()
conf = agrs["conf"].(*cfg.Game_equipData)

View File

@ -8,13 +8,13 @@ import (
)
//参数校验
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.Items_Getlist_Req) (result map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.ItemsGetlistReq) (result map[string]interface{}, code comm.ErrorCode) {
result = map[string]interface{}{"ce": 123}
return
}
///获取用户道具
func (this *apiComp) Getlist(session comm.IUserSession, agrs map[string]interface{}, req *pb.Items_Getlist_Req) (code pb.ErrorCode) {
func (this *apiComp) Getlist(session comm.IUserSession, agrs map[string]interface{}, req *pb.ItemsGetlistReq) (code pb.ErrorCode) {
var (
err error
items []*pb.DB_UserItemData
@ -25,7 +25,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, agrs map[string]interfac
dels []string
)
defer func() {
session.SendMsg(string(this.module.GetType()), GetlistResp, &pb.Items_Getlist_Resp{Grids: grids})
session.SendMsg(string(this.module.GetType()), GetlistResp, &pb.ItemsGetlistResp{Grids: grids})
if code == pb.ErrorCode_Success {
go func() { //异步处理修改数据
this.module.modelItems.Pack_UpdateUserPack(session.GetUserId(), modifys...)

View File

@ -6,15 +6,15 @@ import (
)
//参数校验
func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.Items_SellItem_Req) (result map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.ItemsSellItemReq) (result map[string]interface{}, code comm.ErrorCode) {
return
}
//出售道具
func (this *apiComp) SellItem(session comm.IUserSession, agrs map[string]interface{}, req *pb.Items_SellItem_Req) (code pb.ErrorCode) {
func (this *apiComp) SellItem(session comm.IUserSession, agrs map[string]interface{}, req *pb.ItemsSellItemReq) (code pb.ErrorCode) {
defer func() {
session.SendMsg(string(this.module.GetType()), SellItemResp, &pb.Items_SellItem_Resp{})
session.SendMsg(string(this.module.GetType()), SellItemResp, &pb.ItemsSellItemResp{})
}()
return
}

View File

@ -6,15 +6,15 @@ import (
)
//参数校验
func (this *apiComp) UseitemCheck(session comm.IUserSession, req *pb.Items_UseItem_Req) (result map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) UseitemCheck(session comm.IUserSession, req *pb.ItemsUseItemReq) (result map[string]interface{}, code comm.ErrorCode) {
return
}
//使用道具
func (this *apiComp) Useitem(session comm.IUserSession, agrs map[string]interface{}, req *pb.Items_UseItem_Req) (code pb.ErrorCode) {
func (this *apiComp) Useitem(session comm.IUserSession, agrs map[string]interface{}, req *pb.ItemsUseItemReq) (code pb.ErrorCode) {
defer func() {
session.SendMsg(string(this.module.GetType()), UseItemResp, &pb.Items_UseItem_Resp{})
session.SendMsg(string(this.module.GetType()), UseItemResp, &pb.ItemsUseItemResp{})
}()
return