上传竞技场设置防守阵型问题
This commit is contained in:
parent
f01073cdad
commit
34de6aa72d
@ -5,13 +5,29 @@ import (
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) SetDefFormtCheck(session comm.IUserSession, req *pb.ArenaSetDefFormtReq) (errdata *pb.ErrorData) {
|
||||
|
||||
if len(req.Formt) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: "阵容 不能为空!",
|
||||
}
|
||||
}
|
||||
for _, v := range req.Formt {
|
||||
if v != "" {
|
||||
return
|
||||
}
|
||||
}
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: "阵容 不能为空!",
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///设置防守阵型
|
||||
// /设置防守阵型
|
||||
func (this *apiComp) SetDefFormt(session comm.IUserSession, req *pb.ArenaSetDefFormtReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBArenaUser
|
||||
@ -51,7 +67,6 @@ func (this *apiComp) SetDefFormt(session comm.IUserSession, req *pb.ArenaSetDefF
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "setdefformt", &pb.ArenaSetDefFormtResp{Issucc: true})
|
||||
|
Loading…
Reference in New Issue
Block a user