1234567891011121314151617181920212223242526272829303132333435363738 |
- 'use strict';
- const Controller = require('egg').Controller;
- class ColumnController extends Controller {
- async create() {
- const { ctx } = this;
- const res = await ctx.service.column.create(ctx.request.body);
- ctx.body = res;
- }
- async update() {
- const { ctx } = this;
- const res = await ctx.service.column.update(ctx.request.body);
- ctx.body = res;
- }
- async del() {
- const { ctx } = this;
- const res = await ctx.service.column.del(ctx.params);
- ctx.body = res;
- }
- async query() {
- const { ctx } = this;
- const res = await ctx.service.column.query(ctx.query);
- ctx.body = res;
- }
- async usercolumnquery() {
- const { ctx } = this;
- const res = await ctx.service.column.usercolumnquery(ctx.query);
- ctx.body = res;
- }
- async menuquery() {
- const { ctx } = this;
- const res = await ctx.service.column.menuquery(ctx.query);
- ctx.body = res;
- }
- }
- module.exports = ColumnController;
|