@Override
public PageData inviteLogPage(Map
params.put(“corpId”,SecurityUser.getUser().getCorpId());
params.put(“page”, (Long.valueOf(params.get(“page”).toString()) - 1) * Long.valueOf(params.get(“limit”).toString()));
List pageList = lhTlCorpInviteDao.selectInviteLogPageList(params);
long total = lhTlCorpInviteDao.getInviteLogCount(params);
Page page = new Page(Long.valueOf(params.get(“page”).toString()), Long.valueOf(params.get(“limit”).toString()));
page.setRecords(pageList);
page.setTotal(total);
return getPageData(page, CorpInviteDto.class);
}
/**
*
* @return
*/
List selectInviteLogPageList(@Param(“params”) Map
实现层:
/**
* 列表
* @param params
* @return
/
@Override
public PageResult findList(Map
Map
map.put(“page”,((Integer.parseInt(params.get(“page”).toString()))-1)
map.put(“limit”,(Integer.parseInt(params.get(“limit”).toString())));
List list = baseMapper.findList(map, params);
//获取数据总条数
Long count = baseMapper.getTotal(params);
return PageResult.builder().data(list).code(0).count(count).build();
}
Mapper层:
*/
List findList(@Param(“pageParam”)Map
Mapper.xml
select t.*,ts.speciality_name as specialityName from t_module_detail_code t left join t_speciality ts on t.speciality_id = ts.id where 1=1 and t.detail_code like concat(concat('%',#{p.detailCode}),'%') limit #{pageParam.page}, #{pageParam.limit}
Mapper.xml
1=1
and t.test_catagory_id = #{p.testCatagoryId}
and ttc.id = #{p.testItemId}
and t.test_catagory_id in (select category_id from t_test_item)