修复迁移后错误
This commit is contained in:
@@ -21,19 +21,19 @@ export class CoreAliappService extends BaseService<Aliapp> {
|
||||
return this.aliappRepository.findOne({ where: { aliapp_id } });
|
||||
}
|
||||
|
||||
async create(dto: any) {
|
||||
async create(dto: any): Promise<Aliapp> {
|
||||
const aliapp = this.aliappRepository.create(dto);
|
||||
const saved = await this.aliappRepository.save(aliapp);
|
||||
return saved;
|
||||
return Array.isArray(saved) ? saved[0] : saved;
|
||||
}
|
||||
|
||||
async update(aliapp_id: number, dto: any) {
|
||||
const result = await this.aliappRepository.update(aliapp_id, dto);
|
||||
return result.affected > 0;
|
||||
return (result.affected || 0) > 0;
|
||||
}
|
||||
|
||||
async delete(aliapp_id: number) {
|
||||
const result = await this.aliappRepository.delete(aliapp_id);
|
||||
return result.affected > 0;
|
||||
return (result.affected || 0) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user