fix:Chatbot查询

上级 842e81c0
...@@ -52,16 +52,20 @@ public class ChatbotController { ...@@ -52,16 +52,20 @@ public class ChatbotController {
return Result.ok(list); return Result.ok(list);
} }
/** /**
* 分页查询所有数据 * 分页查询所有数据
* *
* @param page 分页对象
* @param chatbot 查询实体
* @return 所有数据 * @return 所有数据
*/ */
@GetMapping("/page") @GetMapping("/page")
public Result selectAll(Page<Chatbot> page, Chatbot chatbot) { public Result selectAll(@RequestParam Integer page, @RequestParam Integer pageSize) {
return Result.ok(this.chatbotService.page(page, new QueryWrapper<>(chatbot))); Page<Chatbot> page1 = new Page<>();
page1.setCurrent(page);
page1.setSize(pageSize);
QueryWrapper<Chatbot> wrapper = new QueryWrapper<>();
wrapper.orderByDesc("id"); // 按照 id 字段降序排列
return Result.ok(this.chatbotService.page(page1, wrapper));
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册