package com.iformall.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxBusiness;
import com.iformall.domain.po.WxSubBusiness;
import com.iformall.mapper.WxBusinessMapper;
import com.iformall.mapper.WxSubBusinessMapper;
import com.iformall.service.WxBusinessService;
import com.iformall.service.WxSubBusinessService;
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 WxSubBusinessServiceImpl implements WxSubBusinessService {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Autowired
    WxSubBusinessMapper wxSubBusinessMapper;

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

    @Override
    public List<WxSubBusiness> findList(WxSubBusiness record) {
        return wxSubBusinessMapper.findList(record);
    }

    @Override
    public List<WxSubBusiness> findListAll() {
        return wxSubBusinessMapper.findListAll();
    }


    @Override
    public WxSubBusiness getById(Integer id) {
        return wxSubBusinessMapper.selectById(id);
    }

}
