老师就是我想多增加一个模块是活动,但是做的时候很奇怪了,每次mybaties多加了limit 1 只能获取1条
@RequestMapping("activityList.do")
@ResponseBody
public ServiceResponse getList(@RequestParam(value="pageNum",defaultValue = "1")int pageNum,@RequestParam(value = "pageSize",defaultValue = "10")int pageSize){
return editor.getActivityList(pageNum,pageSize);
}
@Override
public ServiceResponsegetActivityList(int pageNum, int pageSize) {
PageHelper.startPage(pageNum,pageSize);
ListactivitiesList = activityMapper.selectList();
PageInfo pageInfo = new PageInfo(activitiesList);
pageInfo.setList(activitiesList);
return ServiceResponse.createBySuccess(pageInfo);
}
select from activity order by create_time desc
id,main_img,detail_id,user_id,briefly,title,create_time,update_time,classify
不知道是啥原因,我做筛选条件也是这样,只获取一条本身我没限制 但是老是喜欢在后加 limit 1;