package com.qingyun.web.controller.api.contract;

import com.qingyun.common.core.domain.R;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.qingyun.common.core.controller.BaseController;
import com.qingyun.service.domain.vo.ContractCompareResultVo;
import com.qingyun.service.service.IContractCompareResultService;

import java.util.List;

/**
 * 合同对比结果
 *
 * @author jianlu
 * @date 2025-07-11
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/compareResult")
public class ContractCompareResultController extends BaseController {

    private final IContractCompareResultService contractCompareResultService;

    /**
     * 查询对比结果列表
     *
     * @param taskId 任务ID
     */
    @GetMapping("/list/{taskId}")
    public R<List<ContractCompareResultVo>> list(@PathVariable("taskId") Long taskId) {
        return R.ok(contractCompareResultService.queryList(taskId));
    }
}
