package com.emr.service.ipml;

import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.TempMasterIDMapper;
import com.emr.dao.Temp_InfoMapper;
import com.emr.entity.*;
import com.emr.service.TempMasterIDService;
import com.emr.service.Temp_InfoService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Temp_InfoServiceImpl implements Temp_InfoService {
    @Autowired
    private Temp_InfoMapper tempInfoMapper;

    @Override
    public int insertSelective(Temp_Info record) {
        return tempInfoMapper.insertSelective(record);
    }

    @Override
    public List<Temp_Info> selByTempMaster(Temp_Info example) {
        return tempInfoMapper.selByTempMaster(example);
    }

    @Override
    public List<Temp_Info> selByCol(Temp_Info example) {
        return tempInfoMapper.selByCol(example);
    }

    @Override
    public OffsetLimitPage selByCol(Temp_Info tempInfo, Integer offset, Integer limit) {
        PageHelper.offsetPage(offset, limit);
        List<Temp_Info> list= tempInfoMapper.selByCol(tempInfo);
        return new OffsetLimitPage((Page) list);
    }

    @Override
    public int delByMasterID(Temp_Info tempInfo) {
        return tempInfoMapper.delByMasterID(tempInfo);
    }
}
