'use strict'; const Controller = require('../extend/baseController'); class SysDictController extends Controller { tag() { return this.ctx.service.sysDictService; } async listForPageSortAsc() { const { ctx } = this; ctx.setOrder(); const result = await this.tag().listForPage(ctx.query); ctx.success(result); } async deleteWithSub() { const { ctx } = this; const result = await this.tag().deleteWithSub(ctx.query.id); ctx.logic(result, '删除失败,该字典存在下级'); } } module.exports = SysDictController;