后台:订单列表
This commit is contained in:
@@ -15,9 +15,10 @@ import { ActivityGroupModel } from '@db/ActivityGroup';
|
||||
import { nowSeconds } from '@pubUtils/timeUtil';
|
||||
import { WhiteListModel } from '@db/RegionWhiteList';
|
||||
import { RoleModel } from '@db/Role';
|
||||
import { SearchMarqueeParam } from '@domain/backEndField/search';
|
||||
import { SearchMarqueeParam, SearchOrderParam } from '@domain/backEndField/search';
|
||||
import { DicServerName } from '@pubUtils/dictionary/DicServerName';
|
||||
import { CreateRegionParam } from '@domain/backEndField/params';
|
||||
import { UserOrderModel } from '@db/UserOrder';
|
||||
|
||||
/**
|
||||
* Test Service
|
||||
@@ -179,6 +180,17 @@ export default class Game extends Service {
|
||||
})
|
||||
}
|
||||
|
||||
public async getOrderlist(page: number, pageSize: number, sortField: string, sortOrder: string, form: SearchOrderParam) {
|
||||
const { ctx } = this;
|
||||
const list = await UserOrderModel.findByCondition(page, pageSize, sortField, sortOrder, form);
|
||||
const total = await UserOrderModel.countByCondition( form )
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
list: list.map(cur => {
|
||||
return { ...cur, createdAt: cur.createdAt.getTime(), updatedAt: cur.updatedAt.getTime(), env: this.app.config.realEnv }
|
||||
}), total
|
||||
});
|
||||
}
|
||||
|
||||
public async getNoticeList(page: number, pageSize: number, sortField: string, sortOrder: string, form: { content?: string }) {
|
||||
const { ctx } = this;
|
||||
const list = await NoticeModel.findByCondition(page, pageSize, sortField, sortOrder, form);
|
||||
|
||||
Reference in New Issue
Block a user