feat 废弃jwt 、 学识分
This commit is contained in:
@@ -71,6 +71,16 @@ func (s *Server) CategoryAnswerQuestion(ctx context.Context, req *grpc_pb.Catego
|
||||
QuestionAnswer: question.Answer,
|
||||
Answer: req.Answer,
|
||||
})
|
||||
|
||||
// 类目答题正确给5分,错误不得分
|
||||
if req.Answer == question.Answer {
|
||||
kafka.NewProducer().Produce(ctx, &timer.TopicAddPoint{
|
||||
MessageSn: utils.SnowflakeInstance().Generate().Int64(),
|
||||
Source: timer.AddPointSourceCategory,
|
||||
USN: req.USN,
|
||||
Point: 5,
|
||||
})
|
||||
}
|
||||
}
|
||||
return &grpc_pb.CategoryAnswerQuestionResp{
|
||||
Answer: question.Answer,
|
||||
|
||||
Reference in New Issue
Block a user