|
@@ -21,6 +21,21 @@ export class ContactApplyController {
|
|
|
@Inject()
|
|
|
esService: ESService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据申请信息,找到联系人进行填充
|
|
|
+ * @param id 申请id
|
|
|
+ */
|
|
|
+ @Get('/contacts/:id')
|
|
|
+ async getContacts(@Param('id') id: number) {
|
|
|
+ const data = await await this.service.fetch({ id });
|
|
|
+ if (!data) throw new ServiceError(ErrorCode.DATA_NOT_FOUND); // 抛出异常,未找到要审核的数据
|
|
|
+ const source = get(data, 'source');
|
|
|
+ const source_id = get(data, 'source_id');
|
|
|
+ const otherData = await this.service.searchCompleteData(source, source_id);
|
|
|
+ const contacts = await this.service.getContactObject(otherData, source);
|
|
|
+ return contacts;
|
|
|
+ }
|
|
|
+
|
|
|
@Post('/examine', { routerName: `审核${namePrefix}` })
|
|
|
@ApiTags('信息审核')
|
|
|
@ApiQuery({ name: 'examine' })
|