后台:添加操作日志
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { Controller } from 'egg';
|
||||
|
||||
export default class LogController extends Controller {
|
||||
|
||||
public async getGmLog() {
|
||||
const { ctx } = this;
|
||||
const { pageSize, page, form } = ctx.request.body;
|
||||
ctx.body = await ctx.service.log.getGmLog(page, pageSize, form);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -94,4 +94,6 @@ export default (app: Application) => {
|
||||
router.post('/api/mail/updatesinglemailtxt', tokenParser, controller.mail.updateGMMail);
|
||||
router.post('/api/mail/updateservermail', tokenParser, controller.mail.updateGMMail);
|
||||
router.post('/api/mail/updateservermailtxt', tokenParser, controller.mail.updateGMMail);
|
||||
|
||||
router.post('/api/log/getgmlog', controller.log.getGmLog);
|
||||
};
|
||||
|
||||
@@ -101,6 +101,7 @@ export default class GMUsers extends Service {
|
||||
return this.ctx.service.utils.resResult(STATUS.INTERNAL_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建后台账号
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Service } from 'egg';
|
||||
import { STATUS } from '@consts';
|
||||
import { SearchLogParam } from '@domain/backEndField/search';
|
||||
import { GMRecordModel } from '@db/GMRecord';
|
||||
|
||||
/**
|
||||
* Test Service
|
||||
*/
|
||||
export default class Log extends Service {
|
||||
|
||||
/**
|
||||
* 修改用户组
|
||||
*/
|
||||
public async getGmLog(page: number, pageSize: number, form: SearchLogParam) {
|
||||
const {ctx} = this;
|
||||
|
||||
let list = await GMRecordModel.findByCondition(page, pageSize, form);
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, { list });
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user