package com.ruoyi.api;


import com.ruoyi.ai.domain.AiTemplate;
import com.ruoyi.ai.service.IAiTemplateService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.RestController;

import java.util.List;

@Api(tags = "ai-template信息")
@RestController
@RequestMapping("/api/template")
public class AiTemplateApiController extends BaseController {

    @Autowired
    private IAiTemplateService aiTemplateService;

    /**
     * 查询Template管理列表
     */
    @GetMapping("/getTemplateList")
    @ApiOperation("查询template列表")
    @Anonymous
    public TableDataInfo getTemplateList(AiTemplate aiTemplate)
    {
        aiTemplate.setStatus(1);
        List<AiTemplate> list = aiTemplateService.selectAiTemplateList(aiTemplate);
        return getDataTable(list);
    }


}
