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

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

/**
 * 问题标签表(QuestionTag)表控制层
 *
 * @author java
 * @since 2020-12-07 11:36:44
 */

@RestController
@RequestMapping("/new/api/app/questionTag")
public class AppQuestionTagController {

    /**
     * 服务对象
     */
    private final QuestionTagService questionTagService;

    public AppQuestionTagController(QuestionTagService questionTagService) {
        this.questionTagService = questionTagService;
    }

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


}