记得上下班打卡 | git大法好,push需谨慎

Commit 7bf43a36 authored by wangyifan's avatar wangyifan

admin-修复专题列表分页bug

parent 8d09b516
......@@ -70,10 +70,12 @@ public class GoblinArtistTopicAdminController extends BaseController {
if (aids.isEmpty()) return getDataTable(Collections.emptyList());
qw.in(GoblinArtistTopic::getArtistId, aids);
}
qw.orderByAsc(GoblinArtistTopic::getSort);
qw.orderByDesc(GoblinArtistTopic::getCreatedAt);
startPage();
return getDataTable(withNames(topicAdminService.list(qw)));
List<GoblinArtistTopic> list = topicAdminService.list(qw);
TableDataInfo dataTable = getDataTable(list);
dataTable.setRows(withNames(list));
return dataTable;
}
private List<Map<String, Object>> withNames(List<GoblinArtistTopic> list) {
......
......@@ -185,8 +185,8 @@
$(function() {
$.table.init({
url: prefix + "/list",
sortName: "sort",
sortOrder: "asc",
sortName: "createdAt",
sortOrder: "desc",
columns: [
{ field: 'topicId', title: '专题ID' },
{ field: 'topicName', title: '专题名称' },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment