package com.test.test.controller;

import com.test.common.core.controller.BaseController;
import com.test.common.core.page.TableDataInfo;
import com.test.test.domain.qo.IDQO;
import com.test.test.domain.vo.TestPlanProjectVo;
import com.test.test.service.ITestPlanProjectService;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试计划需求关联Controller
 *
 * @author test
 * @date 2025-04-25
 */
@Slf4j
@RestController
@RequestMapping("/test/testPlanProject")
public class TestPlanProjectController extends BaseController {

    @Autowired
    private ITestPlanProjectService testPlanProjectService;

    /**
     * 查询测试计划需求关联列表
     */
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IDQO qo) {
        startPage();
        List<TestPlanProjectVo> list = testPlanProjectService.selectTestPlanProjectList(qo.getId());
        return getDataTable(list);
    }
}
