package com.ruoyi.interfaces.service.impl;

import com.ruoyi.interfaces.domain.PtServiceFile;
import com.ruoyi.interfaces.mapper.PtServiceFileDao;
import com.ruoyi.interfaces.service.PtServiceFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * @author weking
 * @date 2019-3-22
 */
@Service
@Transactional
public class PtServiceFileServiceImpl implements PtServiceFileService {

    @Autowired
    private PtServiceFileDao ptServiceFileDao;

    @Override
    public int insert(PtServiceFile ptServiceFile) {
        ptServiceFile.setFileTime(new Date());
        return ptServiceFileDao.insert(ptServiceFile);
    }

    @Override
    public List<PtServiceFile> selectByPrimaryKey(PtServiceFile ptServiceFile) {
        return ptServiceFileDao.selectByPrimaryKey(ptServiceFile);
    }

    @Override
    public int updateByPrimaryKey(PtServiceFile ptServiceFile) {
        return ptServiceFileDao.updateByPrimaryKey(ptServiceFile);
    }

    @Override
    public int deleteByPrimaryKey(String id) {
        return ptServiceFileDao.deleteByPrimaryKey(id);
    }

    @Override
    public List<PtServiceFile> selectAll(String id) {
        return ptServiceFileDao.selectAll(id);
    }

}
