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

import java.util.List;

import lombok.RequiredArgsConstructor;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.qingyun.common.core.controller.BaseController;
import com.qingyun.common.core.domain.R;
import com.qingyun.service.domain.vo.ContractReviewResultVo;
import com.qingyun.service.service.IContractReviewResultService;

/**
 * 合同审查结果
 *
 * @author jianlu
 * @date 2025-07-11
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/service/reviewResult")
public class ContractReviewResultController extends BaseController {

    private final IContractReviewResultService contractReviewResultService;

    /**
     * 查询审查结果列表 "service:reviewResult:list"
     */
    @SaCheckPermission("service:reviewResult:list")
    @GetMapping("/list/{taskId}")
    public R<List<ContractReviewResultVo>> list(@PathVariable("taskId") Long taskId) {
        return R.ok(contractReviewResultService.queryList(taskId));
    }
}
