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

import com.hc.business.service.ZccmQuestionAnswerService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;


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

@RestController
@RequestMapping("/new/api/front/questionAnswer")
public class FrontQuestionAnswerController {

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

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

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


}