package io.renren.modules.generator.service.impl;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.EdgenodesDao;
import io.renren.modules.generator.entity.EdgenodesEntity;
import io.renren.modules.generator.service.EdgenodesService;


@Service("edgenodesService")
public class EdgenodesServiceImpl extends ServiceImpl<EdgenodesDao, EdgenodesEntity> implements EdgenodesService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String edgenodesName= (String) params.get("edgenodesName");

        IPage<EdgenodesEntity> page = this.page(
                new Query<EdgenodesEntity>().getPage(params),
                new QueryWrapper<EdgenodesEntity>()
                .eq(StringUtils.isNotBlank(edgenodesName),"edgenodes_name",edgenodesName)
        );

        return new PageUtils(page);
    }

}