package com.ruoyi.api;

import com.ruoyi.ai.domain.AiOrder;
import com.ruoyi.ai.service.IAiOrderService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ai作品Controller
 * 
 * @author shi
 * @date 2025-11-25
 */
@RestController
@RequestMapping("/api/work")
public class AiWorkApiController extends BaseController
{
    @Autowired
    private IAiOrderService orderService;

    /**
     * 查询ai作品列表
     */
    @ApiOperation("查询ai作品列表")
    @GetMapping("/getAiWorkList")
    @Anonymous
    public TableDataInfo getAiWorkList(AiOrder aiOrder)
    {
        startPage();
        aiOrder.setIsTop("Y");
        List<AiOrder> list = orderService.selectAiOrderList(aiOrder);
        return getDataTable(list);
    }
}
