package com.foreverwin.mesnac.meapi.service.impl;

import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.DcParameter;
import com.foreverwin.mesnac.meapi.mapper.DcParameterMapper;
import com.foreverwin.mesnac.meapi.service.DcParameterService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pavel.liu
 * @since 2021-07-13
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DcParameterServiceImpl extends ServiceImpl<DcParameterMapper, DcParameter> implements DcParameterService {


    @Autowired
    private DcParameterMapper dcParameterMapper;

    @Override
    public IPage<DcParameter> selectPage(FrontPage<DcParameter> frontPage, DcParameter dcParameter) {
        QueryWrapper<DcParameter> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(dcParameter);
        return super.page(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<DcParameter> selectList(DcParameter dcParameter) {
        QueryWrapper<DcParameter> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(dcParameter);
        return super.list(queryWrapper);
    }


}