Browse Source

修改接口字段

zs 10 months ago
parent
commit
4178862670

+ 2 - 1
src/entity/platform/achievement.entity.ts

@@ -7,6 +7,8 @@ import * as dayjs from 'dayjs';
 export class Achievement extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '专利号' })
   patent: string;
   @Column({ type: 'character varying', nullable: true, comment: '名称' })
@@ -37,7 +39,6 @@ export class Achievement extends BaseModel {
   is_use: string;
   @Column({ type: 'character varying', nullable: true, comment: '状态', default: '0' })
   status: string;
-
   @Column({ type: 'character varying', nullable: true, comment: '项目来源' })
   source: string;
   @Column({ type: 'character varying', nullable: true, comment: '负责人' })

+ 2 - 0
src/entity/platform/demand.entity.ts

@@ -5,6 +5,8 @@ import { BaseModel } from '../../frame/BaseModel';
 export class Demand extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '名称' })
   name: string;
   @Column({ type: 'character varying', nullable: true, comment: '类型' })

+ 2 - 2
src/entity/platform/design.entity.ts

@@ -15,8 +15,8 @@ export class Design extends BaseModel {
   brief: string;
   @Column({ type: 'jsonb', nullable: true, comment: 'logo' })
   logoUrl: Array<any>;
-  @Column({ type: 'jsonb', nullable: true, comment: '视频' })
-  videoUrl: Array<any>;
+  @Column({ type: 'jsonb', nullable: true, comment: '轮播图' })
+  carouselUrl: Array<any>;
   @Column({ type: 'jsonb', nullable: true, comment: '网站底部信息' })
   footInfo: object;
 }

+ 2 - 0
src/entity/platform/match.entity.ts

@@ -5,6 +5,8 @@ import { BaseModel } from '../../frame/BaseModel';
 export class Match extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '名称' })
   name: string;
   @Column({ type: 'character varying', nullable: true, comment: '类型' })

+ 2 - 0
src/entity/platform/news.entity.ts

@@ -4,6 +4,8 @@ import * as dayjs from 'dayjs';
 // 新闻
 @Entity('news')
 export class News extends BaseModel {
+  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '标题' })
   title: string;
   @Column({ type: 'jsonb', default: [], nullable: true, comment: '封面' })

+ 2 - 0
src/entity/platform/project.entity.ts

@@ -5,6 +5,8 @@ import { BaseModel } from '../../frame/BaseModel';
 export class Project extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '名称' })
   name: string;
   @Column({ type: 'character varying', nullable: true, comment: '发布时间' })

+ 3 - 3
src/entity/platform/supply.entity.ts

@@ -5,6 +5,8 @@ import { BaseModel } from '../../frame/BaseModel';
 export class Supply extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '名称' })
   name: string;
   @Column({ type: 'character varying', nullable: true, comment: '类型' })
@@ -15,7 +17,7 @@ export class Supply extends BaseModel {
   urgent: string;
   @Column({ type: 'character varying', nullable: true, comment: '合作方式' })
   method: string;
-  @Column({ type: 'character varying', nullable: true, comment: '有效期' })
+  @Column({ type: 'jsonb', nullable: true, comment: '有效期' })
   time: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '价格' })
   money: string;
@@ -29,10 +31,8 @@ export class Supply extends BaseModel {
   is_use: string;
   @Column({ type: 'character varying', nullable: true, comment: '状态' })
   status: string;
-
   @Column({ type: 'character varying', nullable: true, comment: '所属产业' })
   industry: string;
-
   @Column({ type: 'character varying', nullable: true, comment: '项目来源' })
   source: string;
 }

+ 2 - 0
src/entity/users/company.entity.ts

@@ -6,6 +6,8 @@ import * as dayjs from 'dayjs';
 export class Company extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'character varying', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '企业名称' })
   name: string;
   @Column({ type: 'jsonb', nullable: true, comment: 'logo' })

+ 2 - 1
src/entity/users/expert.entity.ts

@@ -7,6 +7,8 @@ import dayjs = require('dayjs');
 export class Expert extends BaseModel {
   @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
   user: number;
+  @Column({ type: 'character varying', nullable: true, comment: '标签' })
+  tags: Array<any>;
   @Column({ type: 'character varying', nullable: true, comment: '专家姓名' })
   name: string;
   @Column({ type: 'jsonb', nullable: true, comment: '头像' })
@@ -39,7 +41,6 @@ export class Expert extends BaseModel {
   is_show: string;
   @Column({ type: 'character varying', nullable: true, comment: '状态', default: '0' })
   status: string;
-
   @Column({ type: 'character varying', nullable: true, comment: '产业类型' })
   industry_type: string;
   @Column({ type: 'character varying', nullable: true, comment: '产业' })

+ 35 - 2
src/frame/BaseService.ts

@@ -4,7 +4,9 @@ import * as toqm from 'typeorm';
 import { get, isNull, isObject, isUndefined, pick } from 'lodash';
 import { App, Inject } from '@midwayjs/core';
 import { Opera } from './dbOpera';
+import { InjectEntityModel } from '@midwayjs/typeorm';
 import { OperaService } from '../service/log/opera.service';
+import { Tags } from '../entity/platform/tags.entity';
 
 export interface QueryOpera {
   column: string;
@@ -18,12 +20,17 @@ export interface QueryOpera {
 export abstract class BaseService<T> {
   @App()
   app: Application;
+
   @Inject()
   ctx: Context;
+
   @Inject()
   operaLogsService: OperaService;
   abstract model: Repository<T>;
 
+  @InjectEntityModel(Tags)
+  tModel: Repository<Tags>;
+
   /**
    * 列表查询
    * @param query 查询条件(经过queryBuilder转换后的)
@@ -38,7 +45,14 @@ export abstract class BaseService<T> {
       for (const column in order) orderObject[column] = order[column];
     } else orderObject = { created_time: 'DESC' };
     if (query.length > 0) findOpera = this.buildFindWhere(query);
-    const builder = await this.model.createQueryBuilder().setFindOptions({ where: findOpera, skip, take: limit, order: orderObject });
+    let builder;
+    if ('tags' in findOpera) {
+      const column = get(findOpera, 'tags');
+      delete findOpera.tags;
+      builder = await this.model.createQueryBuilder().setFindOptions({ where: findOpera, skip, take: limit, order: orderObject }).where('JSONB_EXISTS(tags, :column)', { column });
+    } else {
+      builder = await this.model.createQueryBuilder().setFindOptions({ where: findOpera, skip, take: limit, order: orderObject });
+    }
     const data = await builder.getMany();
     const total = await builder.getCount();
     return { data, total };
@@ -113,9 +127,13 @@ export abstract class BaseService<T> {
         queryArray.push(qo);
       } else if (dataType === 'timestamp without time zone') {
         //默认不处理
+      } else if (dataType === 'jsonb') {
+        if (column === 'tags') {
+          const qo: QueryOpera = { column, value: query[column], opera: [] };
+          queryArray.push(qo);
+        }
       }
     }
-
     return queryArray;
   }
 
@@ -133,6 +151,9 @@ export abstract class BaseService<T> {
     if (this.ctx.user) Object.assign(data, { data_owner: this.ctx.user.id });
     const result = await this.model.insert(data);
     const mn = this.model.metadata.tableName;
+    // 处理标签
+    const tagsList: Array<any> = get(data, 'tags');
+    if (tagsList && Array.isArray(tagsList) && tagsList.length > 0) await this.tagsAdd(tagsList);
     // 添加,没有原数据,只有新数据
     await this.operaLogsService.toMakeLogs(null, { [mn]: [data] });
     return result;
@@ -162,6 +183,9 @@ export abstract class BaseService<T> {
     // 修改成新的数据,result只是结果,需要重新查一遍
     const new_data = await this.model.find({ where });
     const mn = this.model.metadata.tableName;
+    // 处理标签
+    const tagsList: Array<any> = get(data, 'tags');
+    if (tagsList && Array.isArray(tagsList) && tagsList.length > 0) await this.tagsAdd(tagsList);
     // 日志
     await this.operaLogsService.toMakeLogs({ [mn]: origin_data }, { [mn]: new_data });
     return result;
@@ -177,4 +201,13 @@ export abstract class BaseService<T> {
     await this.operaLogsService.toMakeLogs({ [mn]: origin_data });
     return result;
   }
+
+  /**处理标签,标签表内有不处理,没有标签新增 */
+  async tagsAdd(tagsList: Array<any>) {
+    for (const val of tagsList) {
+      const where = { title: val };
+      const tags = await this.tModel.findOne({ where });
+      if (!tags) await this.tModel.save(where);
+    }
+  }
 }

+ 3 - 1
src/interface/login.interface.ts

@@ -28,10 +28,11 @@ export class LoginVO {
   constructor(data: object) {
     this.id = get(data, 'id');
     this.nick_name = get(data, 'nick_name');
+    this.dept = get(data, 'dept');
     this.openid = get(data, 'openid');
     this.role = get(data, 'role');
     this.is_super = get(data, 'is_super');
-    this.dept = get(data, 'dept');
+    this.account = get(data, 'account');
   }
   id: string;
   nick_name: string;
@@ -41,4 +42,5 @@ export class LoginVO {
   @ApiProperty({ description: '登录标识' })
   'login_code': string = undefined;
   dept?: string;
+  account?: string;
 }

+ 29 - 1
src/interface/platform/achievement.interface.ts

@@ -7,6 +7,8 @@ export class FVO_achievement {
   }
   @ApiProperty({ description: '数据id' })
   id: number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
   @ApiProperty({ description: '专利号' })
@@ -29,6 +31,12 @@ export class FVO_achievement {
   'time': string = undefined;
   @ApiProperty({ description: '参考价格' })
   'money': string = undefined;
+  @ApiProperty({ description: '来源' })
+  'source': string = undefined;
+  @ApiProperty({ description: '负责人' })
+  'person': string = undefined;
+  @ApiProperty({ description: '联系电话' })
+  'tel': string = undefined;
   @ApiProperty({ description: '简介' })
   'brief': string = undefined;
   @ApiProperty({ description: '附件' })
@@ -44,6 +52,8 @@ export class FVO_achievement {
 export class QDTO_achievement {
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '专利号' })
   'patent': string = undefined;
   @ApiProperty({ description: '名称' })
@@ -60,6 +70,12 @@ export class QDTO_achievement {
   'technology': string = undefined;
   @ApiProperty({ description: '参考价格' })
   'money': string = undefined;
+  @ApiProperty({ description: '来源' })
+  'source': string = undefined;
+  @ApiProperty({ description: '负责人' })
+  'person': string = undefined;
+  @ApiProperty({ description: '联系电话' })
+  'tel': string = undefined;
   @ApiProperty({ description: '成果状态' })
   'achievement_status': string = undefined;
   @ApiProperty({ description: '是否公开' })
@@ -79,6 +95,9 @@ export class CDTO_achievement {
   @ApiProperty({ description: '用户id' })
   @Rule(RuleType['number']().empty(''))
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '专利号' })
   @Rule(RuleType['string']().empty(''))
   'patent': string = undefined;
@@ -109,13 +128,22 @@ export class CDTO_achievement {
   @ApiProperty({ description: '参考价格' })
   @Rule(RuleType['string']().empty(''))
   'money': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  @Rule(RuleType['string']().empty(''))
+  'source': string = undefined;
+  @ApiProperty({ description: '负责人' })
+  @Rule(RuleType['string']().empty(''))
+  'person': string = undefined;
+  @ApiProperty({ description: '联系电话' })
+  @Rule(RuleType['string']().empty(''))
+  'tel': string = undefined;
   @ApiProperty({ description: '简介' })
   @Rule(RuleType['string']().empty(''))
   'brief': string = undefined;
   @ApiProperty({ description: '附件' })
   @Rule(RuleType['array']().empty(''))
   'file': Array<any> = undefined;
-  @ApiProperty({ description: 'achievement_status' })
+  @ApiProperty({ description: '成果状态' })
   @Rule(RuleType['string']().empty(''))
   'achievement_status': string = undefined;
   @ApiProperty({ description: '状态' })

+ 76 - 0
src/interface/platform/demand.interface.ts

@@ -9,6 +9,8 @@ export class FVO_demand {
   id: number = undefined;
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '类型' })
@@ -25,6 +27,24 @@ export class FVO_demand {
   'money': string = undefined;
   @ApiProperty({ description: '需求地区' })
   'area': Array<any> = undefined;
+  @ApiProperty({ description: '所属产业' })
+  'industry': string = undefined;
+  @ApiProperty({ description: '所属企业' })
+  'company': string = undefined;
+  @ApiProperty({ description: '企业简况' })
+  'company_brief': string = undefined;
+  @ApiProperty({ description: '联系人' })
+  'contacts': string = undefined;
+  @ApiProperty({ description: '联系电话' })
+  'tel': string = undefined;
+  @ApiProperty({ description: '年份' })
+  'year': string = undefined;
+  @ApiProperty({ description: '月份' })
+  'month': string = undefined;
+  @ApiProperty({ description: '技术需求名称' })
+  'tec_name': string = undefined;
+  @ApiProperty({ description: '待解决问题' })
+  'question': string = undefined;
   @ApiProperty({ description: '简介' })
   'brief': string = undefined;
   @ApiProperty({ description: '需求状态' })
@@ -38,6 +58,8 @@ export class FVO_demand {
 export class QDTO_demand {
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '类型' })
@@ -48,6 +70,30 @@ export class QDTO_demand {
   'method': string = undefined;
   @ApiProperty({ description: '需求紧急度' })
   'urgent': string = undefined;
+  @ApiProperty({ description: '有效期' })
+  'time': Array<any> = undefined;
+  @ApiProperty({ description: '价格' })
+  'money': string = undefined;
+  @ApiProperty({ description: '需求地区' })
+  'area': Array<any> = undefined;
+  @ApiProperty({ description: '所属产业' })
+  'industry': string = undefined;
+  @ApiProperty({ description: '所属企业' })
+  'company': string = undefined;
+  @ApiProperty({ description: '企业简况' })
+  'company_brief': string = undefined;
+  @ApiProperty({ description: '联系人' })
+  'contacts': string = undefined;
+  @ApiProperty({ description: '联系电话' })
+  'tel': string = undefined;
+  @ApiProperty({ description: '年份' })
+  'year': string = undefined;
+  @ApiProperty({ description: '月份' })
+  'month': string = undefined;
+  @ApiProperty({ description: '技术需求名称' })
+  'tec_name': string = undefined;
+  @ApiProperty({ description: '待解决问题' })
+  'question': string = undefined;
   @ApiProperty({ description: '需求状态' })
   'demand_status': string = undefined;
   @ApiProperty({ description: '状态' })
@@ -67,6 +113,9 @@ export class CDTO_demand {
   @ApiProperty({ description: '用户id' })
   @Rule(RuleType['number']().empty(''))
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   @Rule(RuleType['string']().empty(''))
   'name': string = undefined;
@@ -91,6 +140,33 @@ export class CDTO_demand {
   @ApiProperty({ description: '需求地区' })
   @Rule(RuleType['array']().empty(''))
   'area': Array<any> = undefined;
+  @ApiProperty({ description: '所属产业' })
+  @Rule(RuleType['string']().empty(''))
+  'industry': string = undefined;
+  @ApiProperty({ description: '所属企业' })
+  @Rule(RuleType['string']().empty(''))
+  'company': string = undefined;
+  @ApiProperty({ description: '企业简况' })
+  @Rule(RuleType['string']().empty(''))
+  'company_brief': string = undefined;
+  @ApiProperty({ description: '联系人' })
+  @Rule(RuleType['string']().empty(''))
+  'contacts': string = undefined;
+  @ApiProperty({ description: '联系电话' })
+  @Rule(RuleType['string']().empty(''))
+  'tel': string = undefined;
+  @ApiProperty({ description: '年份' })
+  @Rule(RuleType['string']().empty(''))
+  'year': string = undefined;
+  @ApiProperty({ description: '月份' })
+  @Rule(RuleType['string']().empty(''))
+  'month': string = undefined;
+  @ApiProperty({ description: '技术需求名称' })
+  @Rule(RuleType['string']().empty(''))
+  'tec_name': string = undefined;
+  @ApiProperty({ description: '待解决问题' })
+  @Rule(RuleType['string']().empty(''))
+  'question': string = undefined;
   @ApiProperty({ description: '简介' })
   @Rule(RuleType['string']().empty(''))
   'brief': string = undefined;

+ 4 - 4
src/interface/platform/design.interface.ts

@@ -19,8 +19,8 @@ export class FVO_design {
   'brief': string = undefined;
   @ApiProperty({ description: 'logo' })
   'logoUrl': Array<any> = undefined;
-  @ApiProperty({ description: '视频' })
-  'videoUrl': Array<any> = undefined;
+  @ApiProperty({ description: '轮播图' })
+  'carouselUrl': Array<any> = undefined;
   @ApiProperty({ description: '网站底部信息' })
   'footInfo': object = undefined;
 }
@@ -53,9 +53,9 @@ export class CDTO_design {
   @ApiProperty({ description: 'logo' })
   @Rule(RuleType['array']().empty(''))
   'logoUrl': Array<any> = undefined;
-  @ApiProperty({ description: '视频' })
+  @ApiProperty({ description: '轮播图' })
   @Rule(RuleType['array']().empty(''))
-  'videoUrl': Array<any> = undefined;
+  'carouselUrl': Array<any> = undefined;
   @ApiProperty({ description: '网站底部信息' })
   @Rule(RuleType['object']().empty(''))
   'footInfo': object = undefined;

+ 7 - 0
src/interface/platform/match.interface.ts

@@ -10,6 +10,8 @@ export class FVO_match {
   id: number = undefined;
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '类型' })
@@ -41,6 +43,8 @@ export class FVO_match {
 export class QDTO_match extends SearchBase {
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '类型' })
@@ -68,6 +72,9 @@ export class CDTO_match {
   @ApiProperty({ description: '用户id' })
   @Rule(RuleType['number']().empty(''))
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   @Rule(RuleType['string']().empty(''))
   'name': string = undefined;

+ 7 - 0
src/interface/platform/news.interface.ts

@@ -8,6 +8,8 @@ export class FVO_news {
   }
   @ApiProperty({ description: '数据id' })
   id: number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '标题' })
   'title': string = undefined;
   @ApiProperty({ description: '封面' })
@@ -31,6 +33,8 @@ export class FVO_news {
 export class QDTO_news extends SearchBase {
   @ApiProperty({ description: '标题' })
   'title': string = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '发布人' })
   'person': string = undefined;
   @ApiProperty({ description: '发布时间' })
@@ -51,6 +55,9 @@ export class QVO_news extends FVO_news {
 }
 
 export class CDTO_news {
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '标题' })
   @Rule(RuleType['string']().empty(''))
   'title': string = undefined;

+ 42 - 1
src/interface/platform/project.interface.ts

@@ -10,6 +10,8 @@ export class FVO_project {
   id: number = undefined;
   @ApiProperty({ description: '平台用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '发布时间' })
@@ -26,6 +28,16 @@ export class FVO_project {
   'cooperate': string = undefined;
   @ApiProperty({ description: '需求地区' })
   'area': Array<any> = undefined;
+  @ApiProperty({ description: '项目主体' })
+  'main': string = undefined;
+  @ApiProperty({ description: '项目进展' })
+  'progress': string = undefined;
+  @ApiProperty({ description: '跟踪支持单位' })
+  'track_unit': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  'source': string = undefined;
+  @ApiProperty({ description: '产业分类' })
+  'industry': string = undefined;
   @ApiProperty({ description: '简介' })
   'brief': string = undefined;
   @ApiProperty({ description: '是否公开' })
@@ -37,6 +49,8 @@ export class FVO_project {
 export class QDTO_project extends SearchBase {
   @ApiProperty({ description: '平台用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '发布时间' })
@@ -49,9 +63,18 @@ export class QDTO_project extends SearchBase {
   'skill': string = undefined;
   @ApiProperty({ description: '领域' })
   'field': string = undefined;
-
   @ApiProperty({ description: '合作类型' })
   'cooperate': string = undefined;
+  @ApiProperty({ description: '项目主体' })
+  'main': string = undefined;
+  @ApiProperty({ description: '项目进展' })
+  'progress': string = undefined;
+  @ApiProperty({ description: '跟踪支持单位' })
+  'track_unit': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  'source': string = undefined;
+  @ApiProperty({ description: '产业分类' })
+  'industry': string = undefined;
   @ApiProperty({ description: '状态' })
   'status': string = undefined;
   @ApiProperty({ description: '是否公开' })
@@ -69,6 +92,9 @@ export class CDTO_project {
   @ApiProperty({ description: '平台用户id' })
   @Rule(RuleType['number']().empty(''))
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   @Rule(RuleType['string']().empty(''))
   'name': string = undefined;
@@ -96,6 +122,21 @@ export class CDTO_project {
   @ApiProperty({ description: '简介' })
   @Rule(RuleType['string']().empty(''))
   'brief': string = undefined;
+  @ApiProperty({ description: '项目主体' })
+  @Rule(RuleType['string']().empty(''))
+  'main': string = undefined;
+  @ApiProperty({ description: '项目进展' })
+  @Rule(RuleType['string']().empty(''))
+  'progress': string = undefined;
+  @ApiProperty({ description: '跟踪支持单位' })
+  @Rule(RuleType['string']().empty(''))
+  'track_unit': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  @Rule(RuleType['string']().empty(''))
+  'source': string = undefined;
+  @ApiProperty({ description: '产业分类' })
+  @Rule(RuleType['string']().empty(''))
+  'industry': string = undefined;
   @ApiProperty({ description: '是否公开' })
   @Rule(RuleType['string']().empty(''))
   'is_use': string = undefined;

+ 24 - 5
src/interface/platform/supply.interface.ts

@@ -10,6 +10,8 @@ export class FVO_supply {
   id: number = undefined;
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '类型' })
@@ -21,13 +23,17 @@ export class FVO_supply {
   @ApiProperty({ description: '合作方式' })
   'method': string = undefined;
   @ApiProperty({ description: '有效期' })
-  'time': string = undefined;
+  'time': Array<any> = undefined;
   @ApiProperty({ description: '价格' })
   'money': string = undefined;
   @ApiProperty({ description: '需求地区' })
   'area': Array<any> = undefined;
   @ApiProperty({ description: '简介' })
   'brief': string = undefined;
+  @ApiProperty({ description: '所属产业' })
+  'industry': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  'source': string = undefined;
   @ApiProperty({ description: '需求状态' })
   'demand_status': string = undefined;
   @ApiProperty({ description: '状态' })
@@ -39,6 +45,8 @@ export class FVO_supply {
 export class QDTO_supply extends SearchBase {
   @ApiProperty({ description: '用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   'name': string = undefined;
   @ApiProperty({ description: '类型' })
@@ -47,8 +55,10 @@ export class QDTO_supply extends SearchBase {
   'field': string = undefined;
   @ApiProperty({ description: '合作方式' })
   'method': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  'area': Array<any> = undefined;
+  @ApiProperty({ description: '所属产业' })
+  'industry': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  'source': string = undefined;
   @ApiProperty({ description: '需求状态' })
   'demand_status': string = undefined;
   @ApiProperty({ description: '状态' })
@@ -68,6 +78,9 @@ export class CDTO_supply {
   @ApiProperty({ description: '用户id' })
   @Rule(RuleType['number']().empty(''))
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '名称' })
   @Rule(RuleType['string']().empty(''))
   'name': string = undefined;
@@ -84,8 +97,8 @@ export class CDTO_supply {
   @Rule(RuleType['string']().empty(''))
   'method': string = undefined;
   @ApiProperty({ description: '有效期' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
+  @Rule(RuleType['array']().empty(''))
+  'time': Array<any> = undefined;
   @ApiProperty({ description: '价格' })
   @Rule(RuleType['string']().empty(''))
   'money': string = undefined;
@@ -95,6 +108,12 @@ export class CDTO_supply {
   @ApiProperty({ description: '简介' })
   @Rule(RuleType['string']().empty(''))
   'brief': string = undefined;
+  @ApiProperty({ description: '所属产业' })
+  @Rule(RuleType['string']().empty(''))
+  'industry': string = undefined;
+  @ApiProperty({ description: '项目来源' })
+  @Rule(RuleType['string']().empty(''))
+  'source': string = undefined;
   @ApiProperty({ description: '需求状态' })
   @Rule(RuleType['string']().empty(''))
   'demand_status': string = undefined;

+ 6 - 1
src/interface/users/company.interface.ts

@@ -9,6 +9,8 @@ export class FVO_company {
   id: number = undefined;
   @ApiProperty({ description: '平台用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '企业名称' })
   'name': string = undefined;
   @ApiProperty({ description: 'logo' })
@@ -52,7 +54,7 @@ export class QDTO_company {
   'user': number = undefined;
   @ApiProperty({ description: '企业名称' })
   'name': string = undefined;
-  @ApiProperty({ description: '企业标签' })
+  @ApiProperty({ description: '标签' })
   'tags': Array<any> = undefined;
   @ApiProperty({ description: '联系电话' })
   'phone': string = undefined;
@@ -81,6 +83,9 @@ export class CDTO_company {
   @ApiProperty({ description: '平台用户id' })
   @Rule(RuleType['number']().empty(''))
   'number': string = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '企业名称' })
   @Rule(RuleType['string']().empty(''))
   'name': string = undefined;

+ 28 - 0
src/interface/users/expert.interface.ts

@@ -9,6 +9,8 @@ export class FVO_expert {
   id: number = undefined;
   @ApiProperty({ description: '平台用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '专家姓名' })
   'name': string = undefined;
   @ApiProperty({ description: '头像' })
@@ -31,6 +33,12 @@ export class FVO_expert {
   'education': string = undefined;
   @ApiProperty({ description: '工作单位' })
   'work': string = undefined;
+  @ApiProperty({ description: '工作类型' })
+  'work_type': string = undefined;
+  @ApiProperty({ description: '产业' })
+  'industry': string = undefined;
+  @ApiProperty({ description: '产业类型' })
+  'industry_type': string = undefined;
   @ApiProperty({ description: '职称' })
   'title': string = undefined;
   @ApiProperty({ description: '简介' })
@@ -46,6 +54,8 @@ export class FVO_expert {
 export class QDTO_expert {
   @ApiProperty({ description: '平台用户id' })
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '专家姓名' })
   'name': string = undefined;
   @ApiProperty({ description: '性别' })
@@ -62,6 +72,12 @@ export class QDTO_expert {
   'title': string = undefined;
   @ApiProperty({ description: '所在地区' })
   'area': Array<any> = undefined;
+  @ApiProperty({ description: '工作类型' })
+  'work_type': string = undefined;
+  @ApiProperty({ description: '产业' })
+  'industry': string = undefined;
+  @ApiProperty({ description: '产业类型' })
+  'industry_type': string = undefined;
   @ApiProperty({ description: '是否公开' })
   'is_show': string = undefined;
   @ApiProperty({ description: '状态' })
@@ -79,6 +95,9 @@ export class CDTO_expert {
   @ApiProperty({ description: '平台用户id' })
   @Rule(RuleType['number']().empty(''))
   'user': number = undefined;
+  @ApiProperty({ description: '标签' })
+  @Rule(RuleType['array']().empty(''))
+  'tags': Array<any> = undefined;
   @ApiProperty({ description: '专家姓名' })
   @Rule(RuleType['string']().empty(''))
   'name': string = undefined;
@@ -112,6 +131,15 @@ export class CDTO_expert {
   @ApiProperty({ description: '工作单位' })
   @Rule(RuleType['string']().empty(''))
   'work': string = undefined;
+  @ApiProperty({ description: '工作类型' })
+  @Rule(RuleType['string']().empty(''))
+  'industry_type': string = undefined;
+  @ApiProperty({ description: '产业' })
+  @Rule(RuleType['string']().empty(''))
+  'industry': string = undefined;
+  @ApiProperty({ description: '产业类型' })
+  @Rule(RuleType['string']().empty(''))
+  'work_type': string = undefined;
   @ApiProperty({ description: '职称' })
   @Rule(RuleType['string']().empty(''))
   'title': string = undefined;

+ 8 - 8
src/service/initData/initOne.service.ts

@@ -1,10 +1,10 @@
-import { Provide } from "@midwayjs/core";
-import { InjectEntityModel } from "@midwayjs/typeorm";
-import { isArray } from "lodash";
-import { Repository } from "typeorm";
-import { Achievement } from "../../entity/platform/achievement.entity";
-import { Demand } from "../../entity/platform/demand.entity";
-import { Expert } from "../../entity/users/expert.entity";
+import { Provide } from '@midwayjs/core';
+import { InjectEntityModel } from '@midwayjs/typeorm';
+import { isArray } from 'lodash';
+import { Repository } from 'typeorm';
+import { Achievement } from '../../entity/platform/achievement.entity';
+import { Demand } from '../../entity/platform/demand.entity';
+import { Expert } from '../../entity/users/expert.entity';
 import * as Excel from 'exceljs';
 // 2024-06-11 导入
 @Provide()
@@ -237,4 +237,4 @@ export class initOneService {
       6: 'title',
     };
   }
-}
+}