上传教学任务错误码返回

This commit is contained in:
liwei1dao 2022-11-11 16:43:34 +08:00
parent 8df79156b7
commit be4bf64b73
3 changed files with 10 additions and 2 deletions

View File

@ -39,6 +39,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
return
}
if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) {
code = pb.ErrorCode_AcademyTaskNoCompleteTask
return
}

View File

@ -39,6 +39,7 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
return
}
if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) {
code = pb.ErrorCode_AcademyTaskNoCompleteTask
return
}
if !info.Hero[req.HeroId] {

View File

@ -267,6 +267,8 @@ const (
ErrorCode_WorldtaskNoComplete ErrorCode = 3804 //任务条件未完成
ErrorCode_WorldtaskFinihed ErrorCode = 3805 //任务已完成
ErrorCode_WorldtaskLastUnFinished ErrorCode = 3806 //上个任务未完成
//academy
ErrorCode_AcademyTaskNoCompleteTask ErrorCode = 3901 //未完成任务
)
// Enum value maps for ErrorCode.
@ -489,6 +491,7 @@ var (
3804: "WorldtaskNoComplete",
3805: "WorldtaskFinihed",
3806: "WorldtaskLastUnFinished",
3901: "AcademyTaskNoCompleteTask",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@ -708,6 +711,7 @@ var (
"WorldtaskNoComplete": 3804,
"WorldtaskFinihed": 3805,
"WorldtaskLastUnFinished": 3806,
"AcademyTaskNoCompleteTask": 3901,
}
)
@ -742,7 +746,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xd1, 0x26, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xf1, 0x26, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -1051,7 +1055,9 @@ var file_errorcode_proto_rawDesc = []byte{
0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e,
0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64,
0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
0x65, 0x64, 0x10, 0xde, 0x1d, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79,
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61,
0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}