mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-02-22 12:40:30 +00:00
去除无用代码
This commit is contained in:
parent
8fe9fac4be
commit
7304fbf296
@ -14,22 +14,5 @@ import { BaseSysMenuEntity } from '../../../base/entity/sys/menu';
|
|||||||
entity: DemoAppGoodsEntity,
|
entity: DemoAppGoodsEntity,
|
||||||
})
|
})
|
||||||
export class DemoAppGoodsController extends BaseController {
|
export class DemoAppGoodsController extends BaseController {
|
||||||
@InjectEntityModel(BaseSysMenuEntity)
|
|
||||||
baseSysMenuEntity: Repository<BaseSysMenuEntity>;
|
|
||||||
|
|
||||||
@Get('/123')
|
|
||||||
async 123() {
|
|
||||||
const ms = await this.baseSysMenuEntity.find();
|
|
||||||
for (const item of ms) {
|
|
||||||
if (item.perms) {
|
|
||||||
let a = item.perms.split(',');
|
|
||||||
a = a.map(e => {
|
|
||||||
return 'base:' + e;
|
|
||||||
});
|
|
||||||
item.perms = a.join(',');
|
|
||||||
this.baseSysMenuEntity.update(item.id, item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this.ok(122);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user