|
@@ -107,7 +107,8 @@ export abstract class BaseService<T extends AnyParamConstructor<any>> {
|
|
|
const num = await this.model.count({ _id: id });
|
|
|
if (num <= 0) throw new ServiceError('未找到要修改的数据', FrameworkErrorEnum.NOT_FOUND_DATA);
|
|
|
await this.model.updateOne({ _id: id }, body);
|
|
|
- return 'ok';
|
|
|
+ const result = await this.model.findById(id).lean();
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
/**
|