后台:抽卡记录

This commit is contained in:
luying
2022-09-19 09:51:37 +08:00
parent c830b2c2c3
commit 8e7eaed214
5 changed files with 47 additions and 0 deletions
+11
View File
@@ -3,6 +3,7 @@ import { STATUS } from '@consts';
import { SearchLogParam, SearchUserLogParam } from '@domain/backEndField/search';
import { GMRecordModel } from '@db/GMRecord';
import { UserLogModel } from '@db/UserLog';
import { UserGachaRecModel } from '@db/UserGachaRec';
/**
* Test Service
@@ -28,4 +29,14 @@ export default class Log extends Service {
let list = await UserLogModel.findByCondition(page, pageSize, form);
return ctx.service.utils.resResult(STATUS.SUCCESS, { list: list.map(cur => ({...cur, env: ctx.app.config.realEnv})) });
}
/**
* 获取抽卡日志
*/
public async getGachaLog(page: number, pageSize: number, form: SearchUserLogParam) {
const {ctx} = this;
let list = await UserGachaRecModel.findByCondition(page, pageSize, form);
return ctx.service.utils.resResult(STATUS.SUCCESS, { list: list.map(cur => ({...cur, env: ctx.app.config.realEnv})) });
}
}