package com.goldenwater.yjjt.service.impl;

import com.goldenwater.common.utils.DateUtils;
import com.goldenwater.yjjt.domain.YjjtFile;
import com.goldenwater.yjjt.mapper.YjjtFileMapper;
import com.goldenwater.yjjt.service.IYjjtFileService;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

@Service("yjjtFileService")
public class YjjtFileServiceImpl implements IYjjtFileService {

    @Resource
    private YjjtFileMapper yjjtFileMapper;

    @Override
    public List<YjjtFile> selectYjjtFileList(YjjtFile yjjtFile) {
        return yjjtFileMapper.selectYjjtFileList(yjjtFile);
    }

    @Override
    public YjjtFile selectYjjtFileById(Long id) {
        return yjjtFileMapper.selectYjjtFileById(id);
    }

    @Override
    public int insertYjjtFile(YjjtFile yjjtFile) {
        yjjtFile.setCreateTime(DateUtils.getNowDate());
        return yjjtFileMapper.insertYjjtFile(yjjtFile);
    }

    @Override
    public int deleteYjjtFileById(Long id) {
        return yjjtFileMapper.deleteYjjtFileById(id);
    }

    @Override
    public int deleteYjjtFileByIds(Long[] ids) {
        return yjjtFileMapper.deleteYjjtFileByIds(ids);
    }
}