package org.linlinjava.jz.admin.service;

import com.github.pagehelper.PageHelper;
import org.linlinjava.jz.db.domain.JzBookOrder;
import org.linlinjava.jz.db.domain.JzCalllog;
import org.linlinjava.jz.db.service.JzBookOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author fuxubing
 */
@Service
public class AdminBookOrderService {
    @Resource
    private JzBookOrderService jzBookOrderService;

    public List<JzBookOrder> queryByPhone(String mobile) {
        JzBookOrder jzBookOrder = new JzBookOrder();
        jzBookOrder.setPhone(mobile);
        return jzBookOrderService.querySelective(jzBookOrder);
    }

    public List<JzBookOrder> querySelective(String mobile, Integer page, Integer limit) {
        JzBookOrder jzBookOrder = new JzBookOrder();
        jzBookOrder.setPhone(mobile);
        PageHelper.startPage(page, limit);
        return jzBookOrderService.querySelective(jzBookOrder);
    }
}
