首页>代码>vue+springboot2整合实现在线考试管理系统>/springboot/src/main/java/com/exam/controller/AnswerController.java
package com.exam.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.exam.entity.ApiResult;
import com.exam.serviceimpl.AnswerServiceImpl;
import com.exam.util.ApiResultHandler;
import com.exam.vo.AnswerVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class AnswerController {

    @Autowired
    private AnswerServiceImpl answerService;

    @GetMapping("/answers/{page}/{size}")
    public ApiResult findAllQuestion(@PathVariable("page") Integer page, @PathVariable("size") Integer size){
       Page<AnswerVO> answerVOPage = new Page<>(page,size);
       IPage<AnswerVO> answerVOIPage = answerService.findAll(answerVOPage);
       return ApiResultHandler.buildApiResult(200,"查询所有题库",answerVOIPage);

    }
}
最近下载更多
yinxunyu12138  LV11 2024年12月29日
hrbylw  LV9 2024年12月4日
pangzhihui  LV14 2024年9月15日
樱花味小然子  LV5 2024年7月18日
wonderman  LV5 2024年6月30日
JiangYing009  LV8 2024年4月27日
nyb4613  LV8 2024年4月15日
Boss绝  LV9 2024年3月25日
qqttuu  LV3 2024年3月6日
最近浏览更多
gann2015  LV25 4月8日
329512801  LV28 3月24日
ChanLain  LV2 2月19日
yinxunyu12138  LV11 2024年12月29日
ashuai123  LV4 2024年12月21日
hrbylw  LV9 2024年12月4日
Daima000  LV4 2024年12月3日
citybird  LV4 2024年11月18日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友