package com.shzg.project.worn.service.impl;

import java.util.List;
import com.shzg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shzg.project.worn.mapper.WornDeclareFileMapper;
import com.shzg.project.worn.domain.WornDeclareFile;
import com.shzg.project.worn.service.IWornDeclareFileService;

/**
 * 申报单附件Service业务层处理
 * 
 * @author shzg
 * @date 2026-04-14
 */
@Service
public class WornDeclareFileServiceImpl implements IWornDeclareFileService 
{
    @Autowired
    private WornDeclareFileMapper wornDeclareFileMapper;

    /**
     * 查询申报单附件
     * 
     * @param id 申报单附件主键
     * @return 申报单附件
     */
    @Override
    public WornDeclareFile selectWornDeclareFileById(Long id)
    {
        return wornDeclareFileMapper.selectWornDeclareFileById(id);
    }

    /**
     * 查询申报单附件列表
     * 
     * @param wornDeclareFile 申报单附件
     * @return 申报单附件
     */
    @Override
    public List<WornDeclareFile> selectWornDeclareFileList(WornDeclareFile wornDeclareFile)
    {
        return wornDeclareFileMapper.selectWornDeclareFileList(wornDeclareFile);
    }

    /**
     * 新增申报单附件
     * 
     * @param wornDeclareFile 申报单附件
     * @return 结果
     */
    @Override
    public int insertWornDeclareFile(WornDeclareFile wornDeclareFile)
    {
        wornDeclareFile.setCreateTime(DateUtils.getNowDate());
        return wornDeclareFileMapper.insertWornDeclareFile(wornDeclareFile);
    }

    /**
     * 修改申报单附件
     * 
     * @param wornDeclareFile 申报单附件
     * @return 结果
     */
    @Override
    public int updateWornDeclareFile(WornDeclareFile wornDeclareFile)
    {
        return wornDeclareFileMapper.updateWornDeclareFile(wornDeclareFile);
    }

    /**
     * 批量删除申报单附件
     * 
     * @param ids 需要删除的申报单附件主键
     * @return 结果
     */
    @Override
    public int deleteWornDeclareFileByIds(Long[] ids)
    {
        return wornDeclareFileMapper.deleteWornDeclareFileByIds(ids);
    }

    /**
     * 删除申报单附件信息
     * 
     * @param id 申报单附件主键
     * @return 结果
     */
    @Override
    public int deleteWornDeclareFileById(Long id)
    {
        return wornDeclareFileMapper.deleteWornDeclareFileById(id);
    }
}
