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

Commit 7bf43a36 authored by wangyifan's avatar wangyifan

admin-修复专题列表分页bug

parent 8d09b516
...@@ -70,10 +70,12 @@ public class GoblinArtistTopicAdminController extends BaseController { ...@@ -70,10 +70,12 @@ public class GoblinArtistTopicAdminController extends BaseController {
if (aids.isEmpty()) return getDataTable(Collections.emptyList()); if (aids.isEmpty()) return getDataTable(Collections.emptyList());
qw.in(GoblinArtistTopic::getArtistId, aids); qw.in(GoblinArtistTopic::getArtistId, aids);
} }
qw.orderByAsc(GoblinArtistTopic::getSort);
qw.orderByDesc(GoblinArtistTopic::getCreatedAt); qw.orderByDesc(GoblinArtistTopic::getCreatedAt);
startPage(); 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) { private List<Map<String, Object>> withNames(List<GoblinArtistTopic> list) {
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
$(function() { $(function() {
$.table.init({ $.table.init({
url: prefix + "/list", url: prefix + "/list",
sortName: "sort", sortName: "createdAt",
sortOrder: "asc", sortOrder: "desc",
columns: [ columns: [
{ field: 'topicId', title: '专题ID' }, { field: 'topicId', title: '专题ID' },
{ field: 'topicName', title: '专题名称' }, { 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