package com.iformall.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxBusiness;
import com.iformall.mapper.WxBusinessMapper;
import com.iformall.service.WxBusinessService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxBusinessServiceImpl implements WxBusinessService {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Autowired
    WxBusinessMapper wxBusinessMapper;

    @Override
    public PageInfo<WxBusiness> listAsPage(WxBusiness record, Integer pageIndex, Integer pageSize) {
        return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBusinessMapper.findList(record));
    }

    @Override
    public List<WxBusiness> getList(WxBusiness record) {
        return wxBusinessMapper.findList(record);
    }

    @Override
    public WxBusiness getById(Integer id) {
        return wxBusinessMapper.selectByPrimaryKey(id);
    }


}
