go_dreamfactory/modules/pack/api_sellItem.go
2022-06-10 19:22:02 +08:00

31 lines
677 B
Go

package pack
import (
"context"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *Api_Comp) SellItem_Check(ctx context.Context, session comm.IUserSession, req *pb.SellItemReq) (code pb.ErrorCode) {
if !session.IsLogin() {
code = pb.ErrorCode_NoLogin
return
}
return
}
//出售道具
func (this *Api_Comp) SellItem(ctx context.Context, session comm.IUserSession, req *pb.SellItemReq) (err error) {
var (
code pb.ErrorCode
)
defer func() {
session.SendMsg(string(this.module.GetType()), SellItemResp, code, &pb.SellItemResp{})
}()
if code = this.SellItem_Check(ctx, session, req); code != pb.ErrorCode_Success {
return
}
return
}