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


import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import io.renren.modules.app.dao.GwhxxDao;
import io.renren.modules.app.entity.GwhxxEntity;
import io.renren.modules.app.service.GwhxxService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;


@Service("gwhxxService")
public class GwhxxServiceImpl extends ServiceImpl<GwhxxDao, GwhxxEntity> implements GwhxxService {


    /**
     * 分页模糊查询
     * @param pageNum
     * @param pageSize
     * @param gwhxxEntity
     * @return
     */
    @Override
    public PageInfo<GwhxxEntity> queryByPage(Integer pageNum, Integer pageSize, GwhxxEntity gwhxxEntity) {
        PageHelper.startPage(pageNum, pageSize);
        List<GwhxxEntity> gwhxxEntitys = baseMapper.queryByPage(gwhxxEntity);
        PageInfo<GwhxxEntity> pageInfo = new PageInfo<GwhxxEntity>(gwhxxEntitys);
        return pageInfo;
    }

    /**
    * 单个或批量删除
    * @param ids
    */
    @Override
    public void deleteBatch(String[] ids) {
        this.deleteBatchIds(Arrays.asList(ids));
    }

	@Override
	public String querygwhbm() {
		
		return baseMapper.querygwhbm();
	}


}