You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
981 B
34 lines
981 B
package com.shanzhu.oe.controller;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.shanzhu.oe.common.R;
|
|
import com.shanzhu.oe.service.AnswerService;
|
|
import com.shanzhu.oe.util.ApiResultHandler;
|
|
import com.shanzhu.oe.vo.AnswerVO;
|
|
import com.shanzhu.oe.vo.QuestionVO;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
/**
|
|
* 题库 控制层
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
@GetMapping("/answers/{type}/{questionId}")
|
|
public R<QuestionVO> findByIdAndType(
|
|
@PathVariable("type") String type,
|
|
@PathVariable("questionId") Long questionId
|
|
) {
|
|
QuestionVO questionVO = answerService.findByIdAndType(type, questionId);
|
|
return ApiResultHandler.buildApiResult(200, "查询题目", questionVO);
|
|
}
|
|
|
|
}
|