package cn.iocoder.yudao.module.inspection.controller;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.core.controller.BaseController;
import cn.iocoder.yudao.module.inspection.entity.InspectionFileRecord;
import cn.iocoder.yudao.module.inspection.service.InspectionFileRecordService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: 文档记录
 * @Author: 86187
 * @Date: 2025/02/08 13:53
 * @Version: 1.0
 */
@RestController
@RequestMapping("/admin-api/system/fileRecord")
public class InspectionFileRecordController extends BaseController {

    @Autowired
    private InspectionFileRecordService inspectionFileRecordService;

    /**
     * 根据文件id查询修改记录
     * @param id
     * @return
     */
    @GetMapping("/get/{id}")
    public CommonResult<?> getByFileId(@PathVariable Long id) {
        List<InspectionFileRecord> list = inspectionFileRecordService.getRecordList(id);

        return CommonResult.success(list);
    }
}
