分页2
This commit is contained in:
@@ -42,7 +42,7 @@ public interface CashOutDao extends BaseMapper<CashOut> {
|
||||
|
||||
Double selectMayMoney(@Param("userId") Long userId);
|
||||
|
||||
IPage<CashOut> selectCashOutPage(Page<CashOut> page, CashOut cashOut);
|
||||
List<CashOut> selectCashOutPage(CashOut cashOut);
|
||||
|
||||
List<CashOut> selectCashOutList(@Param("cashOut") CashOut cashOut);
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sqx.common.exception.SqxException;
|
||||
import com.sqx.common.utils.Constant;
|
||||
import com.sqx.common.utils.PageUtils;
|
||||
@@ -105,7 +107,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||
|
||||
@Override
|
||||
public PageUtils selectCashOutList(Integer page, Integer limit, CashOut cashOut) {
|
||||
return new PageUtils(baseMapper.selectCashOutPage(new Page<>(page, limit), cashOut));
|
||||
PageHelper.startPage(page, limit);
|
||||
return PageUtils.page(new PageInfo<>(baseMapper.selectCashOutPage(cashOut)));
|
||||
}
|
||||
|
||||
|
||||
@@ -539,8 +542,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||
//cashOut.setState(3);
|
||||
long pageNum = proxy.getLong(Constant.PAGE, 1L);
|
||||
long pageSize = proxy.getLong(Constant.LIMIT, 10L);
|
||||
IPage<CashOut> page = baseMapper.selectCashOutPage(new Page<>(pageNum, pageSize), cashOut);
|
||||
return new PageUtils(page);
|
||||
PageHelper.startPage((int) pageNum, (int) pageSize);
|
||||
return PageUtils.page(new PageInfo<>(baseMapper.selectCashOutPage(cashOut)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user