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

import com.exam.entity.ApiResult;
import com.exam.entity.FillQuestion;
import com.exam.serviceimpl.FillQuestionServiceImpl;
import com.exam.util.ApiResultHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FillQuestionController {

    @Autowired
    private FillQuestionServiceImpl fillQuestionService;

    @PostMapping("/fillQuestion")
    public ApiResult add(@RequestBody FillQuestion fillQuestion) {
        int res = fillQuestionService.add(fillQuestion);
        if (res != 0) {
            return ApiResultHandler.buildApiResult(200,"添加成功",res);
        }
        return ApiResultHandler.buildApiResult(400,"添加失败",res);
    }

    @GetMapping("/fillQuestionId")
    public ApiResult findOnlyQuestionId() {
        FillQuestion res = fillQuestionService.findOnlyQuestionId();
        return ApiResultHandler.buildApiResult(200,"查询成功",res);
}
}
最近下载更多
nyb4613  LV8 4月15日
Boss绝  LV8 3月25日
qqttuu  LV3 3月6日
好的好的  LV8 3月4日
光头强1024  LV7 1月5日
微信网友_6507459064762368  LV2 2023年12月5日
天天  LV7 2023年11月21日
gnnhka  LV10 2023年11月21日
tmf852  LV5 2023年11月21日
唐唐丶  LV33 2023年11月20日
最近浏览更多
dzx199212  LV1 昨天
chirsbey2 前天
暂无贡献等级
nyb4613  LV8 4月13日
wmxhahah  LV7 4月8日
pokerf  LV5 4月7日
玖零定制问题修复  LV34 4月4日
Wu_大花  LV1 4月1日
爱学习的涵  LV6 3月21日
2206371875  LV7 3月14日
auqfnifc  LV3 3月14日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友