package com.inkasso.adapter.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.inkasso.adapter.page.PageQuery;
import com.inkasso.adapter.page.PageResult;
import com.inkasso.adapter.page.Sort;
import com.inkasso.adapter.response.ResponseData;

import java.util.List;

/**
 * @author 张超
 * @date 2021/5/11
 */
public interface KafubaoService<T, D> extends IService<T> {

  /**
   * 不分页查询集合
   *
   * @param obj
   * @return
   */
  List<T> queryList(Sort obj);

  /***
   * 分页查询
   * @param obj
   * @return
   */
  ResponseData<PageResult<D>> pageQuery(PageQuery obj);


  <V> ResponseData<PageResult<V>> pageQuery(PageQuery obj, Class<V> clazz);

  /***
   * 原始分页查询
   * @param obj
   * @return
   */
  IPage<T> originalPageQuery(PageQuery obj);


}
