修复迁移后错误

This commit is contained in:
万物街
2025-09-11 22:06:19 +08:00
parent 7a20a0c50a
commit 6a3b302e69
193 changed files with 11792 additions and 1268 deletions

View File

@@ -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;
}
}