package cn.cecep.talroad.service.impl.analysis;

import cn.cecep.talroad.vo.query.analysis.BasDeviceParamQuery;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.cecep.talroad.domain.analysis.BasDeviceParam;
import cn.cecep.talroad.mapper.analysis.BasDeviceParamMapper;
import cn.cecep.talroad.service.analysis.BasDeviceParamService;
import org.springframework.transaction.annotation.Transactional;

@Service("basDeviceParamNewService")
public class BasDeviceParamServiceImpl extends ServiceImpl<BasDeviceParamMapper, BasDeviceParam> implements BasDeviceParamService{

    @Override
    public int updateBatch(List<BasDeviceParam> list) {
        return baseMapper.updateBatch(list);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateBatchSelective(List<BasDeviceParam> list) {
        return baseMapper.updateBatchSelective(list);
    }
    @Override
    public int batchInsert(List<BasDeviceParam> list) {
        return baseMapper.batchInsert(list);
    }

    @Override
    public IPage<BasDeviceParam> pageService(BasDeviceParamQuery param) {
        Page<BasDeviceParam> page = new Page<>(param.getPageNum(), param.getPageSize());
        return baseMapper.pageDao(page,param);
    }
}
