lrf il y a 11 mois
Parent
commit
28d9c0b261

+ 1 - 1
src/entity/system/dept.entity.ts

@@ -15,6 +15,6 @@ export class Dept extends BaseModel {
   is_super: string;
   @Column({ type: 'integer', nullable: true, comment: '排序' })
   order_num: number;
-  @Column({ type: 'character varying', comment: '是否为默认菜单 默认:0,非默认:1; 默认不能删除', default: '0' })
+  @Column({ type: 'character varying', comment: '是否为默认菜单 默认:0,非默认:1; 默认不能删除', default: '1' })
   is_default: string;
 }

+ 1 - 1
src/entity/system/menus.entity.ts

@@ -28,7 +28,7 @@ export class Menus extends BaseModel {
   icon: string;
   @Column({ type: 'jsonb', nullable: true, comment: '功能列表 不在功能列表中的功能不能使用' })
   config: Array<any>;
-  @Column({ type: 'character varying', comment: '是否为默认菜单 默认:0,非默认:1; 默认不能删除', default: '0' })
+  @Column({ type: 'character varying', comment: '是否为默认菜单 默认:0,非默认:1; 默认不能删除', default: '1' })
   is_default: string;
   @Column({ type: 'text', nullable: true, comment: '备注' })
   remark: string;

+ 3 - 1
src/entity/system/role.entity.ts

@@ -13,6 +13,8 @@ export class Role extends BaseModel {
   brief: string;
   @Column({ type: 'character varying', default: '0', comment: '是否使用  0使用;1禁用' })
   is_use: string;
-  @Column({ type: 'character varying', comment: '是否为默认 默认:0,非默认:1; 默认不能删除', default: '0' })
+  @Column({ type: 'character varying', comment: '是否为默认 默认:0,非默认:1; 默认不能删除', default: '1' })
   is_default: string;
+  @Column({ type: 'character varying', comment: '是否为管理员角色 0:不是管理员角色;1:是管理员角色', default: '0' })
+  is_admin_role: string;
 }

+ 2 - 6
src/filter/customError.filter.ts

@@ -1,9 +1,4 @@
-import {
-  ApplicationContext,
-  Catch,
-  IMidwayContainer,
-  Inject,
-} from '@midwayjs/core';
+import { ApplicationContext, Catch, IMidwayContainer, Inject } from '@midwayjs/core';
 import { Context } from '@midwayjs/koa';
 import { ServiceError } from '../error/service.error';
 
@@ -15,6 +10,7 @@ export class CustomErrorFilter {
   @ApplicationContext()
   applicationContext: IMidwayContainer;
   async catch(err: Error, ctx: Context) {
+    console.error(err);
     // 接收并处理系统定义错误
     return { errcode: err.message, stack: err.stack };
   }

+ 6 - 1
src/interface/system/role.interface.ts

@@ -19,6 +19,8 @@ export class FVO_role {
   'is_use': string = undefined;
   @ApiProperty({ description: '是否为默认' })
   'is_default': string = undefined;
+  @ApiProperty({ description: '是否为管理员角色' })
+  'is_admin_role': string = undefined;
 }
 
 export class QDTO_role {
@@ -48,12 +50,15 @@ export class CDTO_role {
   @ApiProperty({ description: '简介' })
   @Rule(RuleType['string']().empty(''))
   'brief': string = undefined;
-  @ApiProperty({ description: '是否为默认菜单' })
+  @ApiProperty({ description: '是否为默认' })
   @Rule(RuleType['string']().empty(''))
   'is_default': string = undefined;
   @ApiProperty({ description: '是否使用' })
   @Rule(RuleType['string']().empty(''))
   'is_use': string = undefined;
+  @ApiProperty({ description: '是否为管理员角色' })
+  @Rule(RuleType['string']().empty(''))
+  'is_admin_role': string = undefined;
 }
 
 export class CVO_role extends FVO_role {