package com.hc.web.controller.browser.app;

import com.hc.business.service.ZccmPaperQuestionService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 随机试卷问题表(PaperQuestion)表控制层
 *
 * @author java
 * @since 2020-12-07 11:35:16
 */

@RestController
@RequestMapping("/new/api/app/paperQuestion")
public class AppPaperQuestionController {

    /**
     * 服务对象
     */
    private final ZccmPaperQuestionService paperQuestionService;

    public AppPaperQuestionController(ZccmPaperQuestionService paperQuestionService) {
        this.paperQuestionService = paperQuestionService;
    }

    @GetMapping("/{id}")
    @ApiOperation(value = "依据主键获取 PaperQuestion", response = Result.class)
    public Result selectAppPaperQuestion(@PathVariable("id") Integer id) {
        return Result.success(this.paperQuestionService.queryById(id));
    }


}