lrf vor 1 Monat
Ursprung
Commit
5d99628788

+ 2 - 1
src/controller/users/contactApply.controller.ts

@@ -75,7 +75,8 @@ export class ContactApplyController {
      * 因为词库很少,所以很简单就能达到.要是没达到,那就说是真的差太多了
      */
     const source = get(data, 'source');
-    const source_id = get(data, 'source_id');
+    let source_id: any = get(data, 'source_id');
+    if (source_id) source_id = parseInt(source_id);
     // 检查当前 来源数据是否是当前用户的.是当前用户的也不需要继续了,自己找自己么?
     const otherData = await this.service.searchCompleteData(source, source_id);
     const sourceData = get(otherData, 'sourceData');

+ 11 - 6
src/service/users/contactApply.service.ts

@@ -14,6 +14,8 @@ import { Admin } from '../../entity/system/admin.entity';
 import { Design } from '../../entity/platform/design.entity';
 import { Incubator } from '../../entity/users/incubator.entity';
 import { Sector } from '../../entity/platform/sector.entity';
+import { Project } from '../../entity/platform/project.entity';
+import { Achievement } from '../../entity/platform/achievement.entity';
 
 @Provide()
 export class ContactApplyService extends BaseServiceV2 {
@@ -28,9 +30,16 @@ export class ContactApplyService extends BaseServiceV2 {
 
   @InjectEntityModel(Demand)
   demand: Repository<Demand>;
-
   @InjectEntityModel(Supply)
   supply: Repository<Supply>;
+  @InjectEntityModel(Project)
+  project: Repository<Project>;
+  @InjectEntityModel(Achievement)
+  achievement: Repository<Achievement>;
+  @InjectEntityModel(Incubator)
+  incubator: Repository<Incubator>;
+  @InjectEntityModel(Sector)
+  sector: Repository<Sector>;
 
   @InjectEntityModel(Expert)
   expert: Repository<Expert>;
@@ -39,11 +48,7 @@ export class ContactApplyService extends BaseServiceV2 {
   user: Repository<User>;
   @InjectEntityModel(Admin)
   admin: Repository<Admin>;
-  @InjectEntityModel(Incubator)
-  incubator: Repository<Incubator>;
-
-  @InjectEntityModel(Sector)
-  sector: Repository<Sector>;
+  
 
   /**不需要对象用户和匹配度计算数据类型:孵化基地,产业集群 */
   skipCheckList = ['incubator', 'sector'];