Skip to content

Commit

Permalink
fix: 修改在查询字典数据用时,去掉state=0的数据
Browse files Browse the repository at this point in the history
  • Loading branch information
kangood committed Feb 24, 2024
1 parent 3304409 commit 795cc26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/system/entities/menu.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class MenuEntity extends BaseEntity {
@Column('char', {
name: 'resource_type',
nullable: true,
comment: '[10-顶级菜单 20-二级菜单 60-按钮]; dictType = RESOURCE_TYPE',
comment: '[10-有子级的菜单 20-无子级的菜单 60-按钮]; dictType = RESOURCE_TYPE',
length: 2,
})
resourceType: string | null;
Expand Down
2 changes: 2 additions & 0 deletions src/modules/system/services/dictionary.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export class DictionaryService extends BaseService<
}
// 排除 code='00' 的数据
qb.andWhere(`${this.repository.qbName}.code <> '00'`);
// 排除 state=0 的数据
qb.andWhere(`${this.repository.qbName}.state <> 0`);
return qb.getMany();
}

Expand Down

0 comments on commit 795cc26

Please sign in to comment.