package com.njcn.supervision.service.file.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.supervision.mapper.file.FileUrlMapper;
import com.njcn.supervision.pojo.po.file.FileUrl;
import com.njcn.supervision.service.file.IFileUrlService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 文件信息录入表	 服务实现类
 * </p>
 *
 * @author wr
 * @since 2024-08-14
 */
@Service
public class FileUrlServiceImpl extends MppServiceImpl<FileUrlMapper, FileUrl> implements IFileUrlService {

    @Override
    public List<FileUrl> getFileUrlList(String id) {
        return this.list(new LambdaQueryWrapper<FileUrl>().eq(FileUrl::getSupervisionId, id));
    }

    @Override
    public Boolean addOrUpdateFile(List<FileUrl> list) {
        return this.saveOrUpdateBatchByMultiId(list);
    }
}
