package com.cool.bang.modules.business.service.impl;

import com.cool.bang.common.base.BaseServiceImpl;
import com.cool.bang.common.web.request.PageDomain;
import com.cool.bang.modules.business.domain.LpbHouse;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import com.cool.bang.modules.business.mapper.JobCustomerMapper;
import com.cool.bang.modules.business.domain.JobCustomer;
import com.cool.bang.modules.business.service.IJobCustomerService;

import java.util.List;

/**
* 客源
*
* @author Sy
* 2024-10-21 18:05
*/
@Service
public class JobCustomerServiceImpl extends BaseServiceImpl<JobCustomerMapper, JobCustomer> implements IJobCustomerService {
    @Override
    public PageInfo<LpbHouse> queryByLpbHouse(PageDomain page, Integer customerId) {
        PageHelper.startPage(page.getPage(), page.getLimit());
        List<LpbHouse> list = baseMapper.selectByLpbHouse(customerId);
        return  new PageInfo<>(list);
    }
    @Override
    public PageInfo<JobCustomer> queryByConsultList(PageDomain page, Integer customerId) {
        PageHelper.startPage(page.getPage(), page.getLimit());
        List<JobCustomer> list = baseMapper.selectByConsultList(customerId);
        return  new PageInfo<>(list);
    }

    @Override
    public JobCustomer queryByOpenid(String openid) {
        return baseMapper.selectByOpenid(openid);
    }

    @Override
    public JobCustomer queryByPhone(String phone) {
        return baseMapper.selectByPhone(phone);
    }

}
