后台:活动分组分服
This commit is contained in:
@@ -4,15 +4,15 @@ 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);
|
||||
const { page, pageSize, type, groupId, current, activityId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.getActivityList(page, pageSize, type, groupId, 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);
|
||||
const { activityId, groupId, beginTime, endTime, type, data } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.updateActivity(activityId, groupId, beginTime, endTime, type, data);
|
||||
}
|
||||
|
||||
public async deleteActivity() {
|
||||
@@ -21,4 +21,47 @@ export default class ActivityController extends Controller {
|
||||
ctx.body = await ctx.service.activity.deleteActivity(activityId);
|
||||
|
||||
}
|
||||
|
||||
public async getActivityGroupList() {
|
||||
const { ctx } = this;
|
||||
const { page, pageSize, serverId, current, groupId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.getActivityGroupList(page, pageSize, serverId, current, groupId);
|
||||
return
|
||||
}
|
||||
|
||||
public async updateActivityGroupName() {
|
||||
const { ctx } = this;
|
||||
const { groupId, groupName } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.updateActivityGroupName(groupId, groupName);
|
||||
return
|
||||
}
|
||||
|
||||
public async saveActivitiesToGroup() {
|
||||
const { ctx } = this;
|
||||
const { groupId, activities } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.saveActivitiesToGroup(groupId, activities);
|
||||
return
|
||||
}
|
||||
|
||||
public async saveGroupToServer() {
|
||||
const { ctx } = this;
|
||||
const { groupId, serverIds } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.saveGroupToServer(groupId, serverIds);
|
||||
return
|
||||
}
|
||||
|
||||
public async createGroup() {
|
||||
const { ctx } = this;
|
||||
ctx.body = await ctx.service.activity.createGroup();
|
||||
return
|
||||
}
|
||||
|
||||
public async deleteGroup() {
|
||||
const { ctx } = this;
|
||||
const { groupId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.activity.deleteGroup(groupId);
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user