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

import com.hc.business.service.ZccmQuestionAnswerService;
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;


/**
 * 问题答案表(QuestionAnswer)表控制层
 *
 * @author java
 * @since 2020-12-07 11:36:23
 */

@RestController
@RequestMapping("/new/api/app/questionAnswer")
public class AppQuestionAnswerController {

    /**
     * 服务对象
     */
    private final ZccmQuestionAnswerService questionAnswerService;

    public AppQuestionAnswerController(ZccmQuestionAnswerService questionAnswerService) {
        this.questionAnswerService = questionAnswerService;
    }

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


}