package com.uas.finance.service;

import com.uas.finance.model.Attach;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 附件接口层
 * created by shicr on 2017/12/25
 **/
@Transactional
@Service
public interface AttachService {

    /**
     * 上传附件
     *
     * @param attach
     * @return
     */
    Attach save(Attach attach);

    /**
     * 查找某金融单下的所有附件
     *
     * @param applyId
     * @return
     */
    List<Attach> findAttaches(Long applyId);


    /**
     * 找到保理申请需要下载的文件
     *
     * @param fauu
     * @return
     */
    Attach findDownload(Long fauu);

    /**
     *
     * @param id
     * @return
     */
    void deleteOne(Long id);

    /**
     * 查找某金融申请单的所有附件
     * @param cuId
     * @return
     */
    List<Attach> findAttachesByCuId(Long cuId);
}
