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.DataField;
import com.foreverwin.mesnac.meapi.mapper.DataFieldMapper;
import com.foreverwin.mesnac.meapi.service.DataFieldService;
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 robert
 * @since 2021-06-29
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DataFieldServiceImpl extends ServiceImpl<DataFieldMapper, DataField> implements DataFieldService {


    @Autowired
    private DataFieldMapper dataFieldMapper;

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

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




}