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

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.sys.dao.SysUnitDao;
import io.renren.modules.sys.entity.SysUnitEntity;
import io.renren.modules.sys.service.SysUnitService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("sysUnitService")
public class SysUnitServiceImpl extends ServiceImpl<SysUnitDao, SysUnitEntity> implements SysUnitService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SysUnitEntity> page = this.page(
                new Query<SysUnitEntity>().getPage(params),
                new QueryWrapper<SysUnitEntity>()
        );

        return new PageUtils(page);
    }

}