人人fast的分页参数可以自定义变量名吗?

提问 5 1470
ZERO333
ZERO333 2018-10-24
版本:renren-fast 开发环境:
在请求页面中,分页参数的变量名可以自定义吗?像 'pagep': this.pageIndexp, 'limitp': this.pageSizep, 'key': this.dataForm.type这样,还是说必须是page/limit/key
回帖
  • 这个跟后端有关
    0
  • ZERO333
    ZERO333 (楼主)
    2018-10-24
    怎样修改分页的where条件语句啊,来修改查询出来的结果
    0
  • shengke
    2018-10-25
    这其实是mybatis+的使用 [pre] @Override public LayuiPage queryPage(Map<String, Object> params) { String name = (String)params.get("name"); String goodsSn = (String)params.get("goodsSn"); String newly = (String) params.get("newly"); String hot = (String) params.get("hot"); String sale = (String) params.get("sale"); String categoryId = (String) params.get("categoryId"); Page<GoodsEntity> page = this.selectPage(new Query<GoodsEntity>(params).getPage(), new EntityWrapper<GoodsEntity>() .where(StringUtils.isNotBlank(goodsSn),"goods_sn = {0}", goodsSn) .where(StringUtils.isNotBlank(newly),"newly = {0}", newly) .where(StringUtils.isNotBlank(hot),"hot = {0}", hot) .where(StringUtils.isNotBlank(sale),"sale = {0}", sale) .where(StringUtils.isNotBlank(categoryId),"category_id = {0}", categoryId) .like(StringUtils.isNotBlank(name),"name", name) .orderBy("add_time", false)); return new LayuiPage(page.getRecords(), page.getTotal()); } [/pre]
    0
  • ZERO333
    ZERO333 (楼主)
    2018-10-26
    @shengke Long type = (Long)params.get("type"); System.out.println("====type==="+type); Page<InterfaceeparamEntity> page = this.selectPage( new Query<InterfaceeparamEntity>(params).getPage(), new EntityWrapper<InterfaceeparamEntity>() .eq(type != null,"type", type) ); 直接.eq()这种写法和.where()有什么区别,我这个没有加.where()为什么也是相当于加where条件的意思
    0
  • shengke
    2018-10-26
    img[//cdn.renren.io/85c2f201810261545212122.png]
    0
本帖已结贴