diff --git a/modules/questionnaire/api_answer.go b/modules/questionnaire/api_answer.go index e6f32566b..b1aeb4495 100644 --- a/modules/questionnaire/api_answer.go +++ b/modules/questionnaire/api_answer.go @@ -105,6 +105,6 @@ func (this *apiComp) Answer(session comm.IUserSession, req *pb.QuestionnaireAnsw } return } - session.SendMsg(string(this.module.GetType()), "answer", &pb.QuestionnaireAnswerResp{Info: info.Group[req.Group], Group: req.Group, Award: award}) + session.SendMsg(string(this.module.GetType()), "answer", &pb.QuestionnaireAnswerResp{Info: info.Group[req.Group], Group: req.Group, Complete: finish, Award: award}) return } diff --git a/pb/questionnaire_msg.pb.go b/pb/questionnaire_msg.pb.go index 4b33ccd8f..925f4bd70 100644 --- a/pb/questionnaire_msg.pb.go +++ b/pb/questionnaire_msg.pb.go @@ -193,9 +193,10 @@ type QuestionnaireAnswerResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"` - Info *DBQuestionGroup `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` - Award []*UserAssets `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //奖励 + Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"` + Info *DBQuestionGroup `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` + Complete bool `protobuf:"varint,3,opt,name=complete,proto3" json:"complete"` //是否已完成 + Award []*UserAssets `protobuf:"bytes,4,rep,name=award,proto3" json:"award"` //奖励 } func (x *QuestionnaireAnswerResp) Reset() { @@ -244,6 +245,13 @@ func (x *QuestionnaireAnswerResp) GetInfo() *DBQuestionGroup { return nil } +func (x *QuestionnaireAnswerResp) GetComplete() bool { + if x != nil { + return x.Complete + } + return false +} + func (x *QuestionnaireAnswerResp) GetAward() []*UserAssets { if x != nil { return x.Award @@ -273,15 +281,17 @@ var file_questionnaire_questionnaire_msg_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x71, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x6e, 0x61, 0x69, 0x72, 0x65, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, - 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x6e, 0x61, 0x69, 0x72, 0x65, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, + 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (