后台:运营活动后台
This commit is contained in:
24
gm-server/app/controller/activity.ts
Normal file
24
gm-server/app/controller/activity.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Controller } from 'egg';
|
||||
|
||||
export default class ActivityController extends Controller {
|
||||
|
||||
public async getActivityList() {
|
||||
const { ctx } = this;
|
||||
const { page, pageSize, type, serverId, current, activityId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.getActivityList(page, pageSize, type, serverId, current, activityId);
|
||||
return
|
||||
}
|
||||
|
||||
public async updateActivity() {
|
||||
const { ctx } = this;
|
||||
const { activityId, serverId, beginTime, endTime, type, data } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.updateActivity(activityId, serverId, beginTime, endTime, type, data);
|
||||
}
|
||||
|
||||
public async deleteActivity() {
|
||||
const { ctx } = this;
|
||||
const { activityId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.deleteActivity(activityId);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user