package incheon.res.rdm.com.attachfile.service.impl;

import incheon.res.rdm.com.attachfile.mapper.RdmComAttachfileMapper;
import incheon.res.rdm.com.attachfile.service.RdmComAttachfileService;
import incheon.res.rdm.com.attachfile.vo.RdmComAttachfile;
import incheon.res.rdm.com.attachfile.vo.RdmComAttachfileVO;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;

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

@Service
public class RdmComAttachfileServiceImpl extends EgovAbstractServiceImpl implements RdmComAttachfileService {

	protected Log log = LogFactory.getLog(this.getClass());
	
	@Resource
    private RdmComAttachfileMapper rdmComAttachfileMapper;
	
	/**
	 * @MethodDESC : 첨부파일 목록 조회
	 */
	public List<RdmComAttachfileVO> selectAttachfileList(RdmComAttachfileVO vo) throws Exception{
		return rdmComAttachfileMapper.selectAttachfileList(vo);
	}

	/**
	 * 파일에 대한 상세정보를 조회한다.
	 */
	@Override
	public RdmComAttachfileVO selectFileInf(RdmComAttachfileVO vo) throws Exception {
		return rdmComAttachfileMapper.selectFileInf(vo);
	}

	/**
	 * @MethodDESC : 첨부파일 추가
	 */
	public void insertAttachfile(RdmComAttachfileVO vo) throws Exception{
		rdmComAttachfileMapper.insertAttachfile(vo);
	}
	
	/**
	 * @MethodDESC : 첨부파일 모두 삭제
	 */
	public int deleteAttachfileAll(RdmComAttachfileVO vo) throws Exception{
		return rdmComAttachfileMapper.deleteAttachfileAll(vo);
	}
	
	/**
	 * @MethodDESC : 첨부파일 atfCde로 삭제
	 */
	public int deleteAttachfileCde(RdmComAttachfileVO vo) throws Exception{
		return rdmComAttachfileMapper.deleteAttachfileCde(vo);
	}
	
	/**
	 * @MethodDESC : 첨부파일 adfIdn으로 삭제
	 */
	public int deleteAttachfileIdn(RdmComAttachfileVO vo) throws Exception{
		return rdmComAttachfileMapper.deleteAttachfileIdn(vo);
	}
}