后台:添加权限,添加排序

This commit is contained in:
luying
2021-06-08 20:34:57 +08:00
parent d1a4754fc5
commit 61dc5ea362
4 changed files with 29 additions and 21 deletions
+2 -2
View File
@@ -12,10 +12,10 @@ export default class Activity extends Service {
/**
* 获得活动列表
*/
public async getActivityList(page: number, pageSize: number, type: number = 0, groupId: number = 0, current: boolean = false, activityId: number = 0) {
public async getActivityList(page: number, pageSize: number, sortField: string, sortOrder: string, type: number = 0, groupId: number = 0, current: boolean = false, activityId: number = 0) {
const { ctx } = this;
// console.log('***', page, pageSize, type, groupId, current, activityId)
const list = await ActivityModel.findByCondition(page, pageSize, type, groupId, current, activityId);
const list = await ActivityModel.findByCondition(page, pageSize, sortField, sortOrder, type, groupId, current, activityId);
const total = await ActivityModel.countByCondition(type, groupId, current, activityId);
return ctx.service.utils.resResult(STATUS.SUCCESS, {
list: list.map(cur => {