package com.emr.service.ipml;

import com.emr.dao.ArchiveOtherExtMapper;
import com.emr.entity.ArchiveOtherExt;
import com.emr.entity.ArchiveOtherExtExample;
import com.emr.service.ArchiveOtherExtService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArchiveOtherExtServiceImpl implements ArchiveOtherExtService {
    @Autowired
    private ArchiveOtherExtMapper archiveOtherExtMapper;

    /**
     * 查ext表有无采集任务
     * @param archiveOtherExt
     * @return
     *//*
    public  List<ArchiveOtherExt> selectExtTaskIsExistOrNot(String id){
       /* ArchiveOtherExtExample archiveOtherExtExample = new ArchiveOtherExtExample();
        ArchiveOtherExtExample.Criteria criteria = archiveOtherExtExample.createCriteria();
        if (!StringUtils.isEmpty(masterId)){
            criteria.andMidEqualTo(masterId);
        }
        return archiveOtherExtMapper.selectByExample(archiveOtherExt);
    }*/
    /**
     * 查ext表有无采集任务
     * @param archiveOtherExt
     * @return
     */
    @Override
    public List<ArchiveOtherExt> selectExtTaskIsExistOrNot(ArchiveOtherExt archiveOtherExt) {
        return archiveOtherExtMapper.selectByExample(archiveOtherExt);
    }

    /**
     * 添加一条记录
     * @param archiveOtherExt
     * @return
     */
    @Override
    public Integer insertSelective(ArchiveOtherExt archiveOtherExt) {
        return archiveOtherExtMapper.insertSelective(archiveOtherExt);
    }

    /**
     * 修改一条记录
     * @param archiveOtherExt
     * @return
     */
    @Override
    public Integer updateByPrimaryKeySelective(ArchiveOtherExt archiveOtherExt) {
        return archiveOtherExtMapper.updateByPrimaryKeySelective(archiveOtherExt);
    }
}
