package com.ruoyi.web.controller.front;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.syzy.domain.BWwwGkmc;
import com.ruoyi.syzy.dto.GkmcTreeDTO;
import com.ruoyi.syzy.service.IBWwwGkmcService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@RestController
@Api(tags = "模拟志愿-高考名词")
@RequestMapping("front/syzy/gkmc")
public class FrontSyzyGkmcController extends BaseController {
    @Autowired
    private IBWwwGkmcService gkmcService;

    @GetMapping("list")
    @ApiOperation("01.高考名词列表")
    public TableDataInfo list() {
        List<GkmcTreeDTO> arr = gkmcService.all();
        return getDataTable(arr);
    }

    /**
     *
     * @return
     */
    @GetMapping("detail")
    @ApiOperation("02.高考名词详情")
    public AjaxResult detail(@ApiParam("名词id") @RequestParam Long id) {
        BWwwGkmc data = gkmcService.info(id);
        return AjaxResult.success(data);
    }

}
