zs 11 kuukautta sitten
vanhempi
commit
914a52b037
87 muutettua tiedostoa jossa 12 lisäystä ja 5309 poistoa
  1. 0 1
      package-lock.json
  2. 0 1
      package.json
  3. 2 2
      src/config/config.default.ts
  4. 5 12
      src/config/config.local.ts
  5. 4 11
      src/config/config.prod.ts
  6. 1 10
      src/configuration.ts
  7. 0 83
      src/controller/platform/achievement.controller.ts
  8. 0 78
      src/controller/platform/chat.controller.ts
  9. 0 76
      src/controller/platform/collection.controller.ts
  10. 0 83
      src/controller/platform/demand.controller.ts
  11. 0 68
      src/controller/platform/design.controller.ts
  12. 0 75
      src/controller/platform/match.controller.ts
  13. 0 71
      src/controller/platform/news.controller.ts
  14. 0 83
      src/controller/platform/project.controller.ts
  15. 0 75
      src/controller/platform/sign.controller.ts
  16. 0 84
      src/controller/platform/supply.controller.ts
  17. 0 68
      src/controller/platform/tags.controller.ts
  18. 0 27
      src/controller/tool.controller.ts
  19. 0 73
      src/controller/users/association.controller.ts
  20. 0 88
      src/controller/users/company.controller.ts
  21. 0 73
      src/controller/users/competition.controller.ts
  22. 0 88
      src/controller/users/expert.controller.ts
  23. 0 73
      src/controller/users/incubator.controller.ts
  24. 0 73
      src/controller/users/investment.controller.ts
  25. 0 73
      src/controller/users/state.controller.ts
  26. 0 73
      src/controller/users/unit.controller.ts
  27. 0 65
      src/entity/basic.entity.ts
  28. 0 39
      src/entity/platform/achievement.entity.ts
  29. 0 19
      src/entity/platform/chat.entity.ts
  30. 0 15
      src/entity/platform/collection.entity.ts
  31. 0 33
      src/entity/platform/demand.entity.ts
  32. 0 23
      src/entity/platform/design.entity.ts
  33. 0 35
      src/entity/platform/match.entity.ts
  34. 0 25
      src/entity/platform/news.entity.ts
  35. 0 31
      src/entity/platform/project.entity.ts
  36. 0 27
      src/entity/platform/sign.entity.ts
  37. 0 33
      src/entity/platform/supply.entity.ts
  38. 0 23
      src/entity/platform/tags.entity.ts
  39. 0 23
      src/entity/users/association.entity.ts
  40. 0 45
      src/entity/users/company.entity.ts
  41. 0 23
      src/entity/users/competition.entity.ts
  42. 0 41
      src/entity/users/expert.entity.ts
  43. 0 23
      src/entity/users/incubator.entity.ts
  44. 0 29
      src/entity/users/investment.entity.ts
  45. 0 25
      src/entity/users/state.entity.ts
  46. 0 23
      src/entity/users/unit.entity.ts
  47. 0 160
      src/interface/platform/achievement.interface.ts
  48. 0 90
      src/interface/platform/chat.interface.ts
  49. 0 82
      src/interface/platform/collection.interface.ts
  50. 0 139
      src/interface/platform/demand.interface.ts
  51. 0 96
      src/interface/platform/design.interface.ts
  52. 0 142
      src/interface/platform/match.interface.ts
  53. 0 113
      src/interface/platform/news.interface.ts
  54. 0 137
      src/interface/platform/project.interface.ts
  55. 0 114
      src/interface/platform/sign.interface.ts
  56. 0 139
      src/interface/platform/supply.interface.ts
  57. 0 102
      src/interface/platform/tags.interface.ts
  58. 0 106
      src/interface/users/association.interface.ts
  59. 0 171
      src/interface/users/company.interface.ts
  60. 0 108
      src/interface/users/competition.interface.ts
  61. 0 163
      src/interface/users/expert.interface.ts
  62. 0 106
      src/interface/users/incubator.interface.ts
  63. 0 123
      src/interface/users/investment.interface.ts
  64. 0 113
      src/interface/users/state.interface.ts
  65. 0 106
      src/interface/users/unit.interface.ts
  66. 0 109
      src/queue/esSync.queue.ts
  67. 0 65
      src/service/platform/achievement.service.ts
  68. 0 98
      src/service/platform/chat.service.ts
  69. 0 16
      src/service/platform/collection.service.ts
  70. 0 55
      src/service/platform/demand.service.ts
  71. 0 11
      src/service/platform/design.service.ts
  72. 0 29
      src/service/platform/match.service.ts
  73. 0 16
      src/service/platform/news.service.ts
  74. 0 55
      src/service/platform/project.service.ts
  75. 0 56
      src/service/platform/sign.service.ts
  76. 0 55
      src/service/platform/supply.service.ts
  77. 0 11
      src/service/platform/tags.service.ts
  78. 0 130
      src/service/tool.service.ts
  79. 0 11
      src/service/users/association.service.ts
  80. 0 44
      src/service/users/company.service.ts
  81. 0 11
      src/service/users/competition.service.ts
  82. 0 42
      src/service/users/expert.service.ts
  83. 0 11
      src/service/users/incubator.service.ts
  84. 0 11
      src/service/users/investment.service.ts
  85. 0 11
      src/service/users/state.service.ts
  86. 0 11
      src/service/users/unit.service.ts
  87. 0 19
      src/socket/socket.controller.ts

+ 0 - 1
package-lock.json

@@ -9,7 +9,6 @@
       "version": "1.0.0",
       "license": "MIT",
       "dependencies": {
-        "@elastic/elasticsearch": "^8.12.2",
         "@midwayjs/bootstrap": "^3.12.0",
         "@midwayjs/bull": "3",
         "@midwayjs/core": "^3.12.0",

+ 0 - 1
package.json

@@ -4,7 +4,6 @@
   "description": "",
   "private": true,
   "dependencies": {
-    "@elastic/elasticsearch": "^8.12.2",
     "@midwayjs/bootstrap": "^3.12.0",
     "@midwayjs/bull": "3",
     "@midwayjs/core": "^3.12.0",

+ 2 - 2
src/config/config.default.ts

@@ -2,9 +2,9 @@ import { MidwayConfig } from '@midwayjs/core';
 
 export default {
   // use for cookie sign key, should change to your own and keep security
-  keys: '1706233305258_2242',
+  keys: '1706233305258_2249',
   koa: {
-    port: 7001,
+    port: 20001,
   },
   // 请求记录在redis留存时间,超过时间.数据变化将不会记录.以秒为单位--5分钟
   requestTimeLimit: 300,

+ 5 - 12
src/config/config.local.ts

@@ -3,16 +3,16 @@ const ip = '127.0.0.1'; //120.48.146.1
 const redisHost = '127.0.0.1';
 const redisPwd = '123456';
 const redisDB = 6;
-const projectDB = 'vue3js-template-test';
-const recordDB = 'vue3js-template-test-record'
-const loginSign = 'tsFrameDev';
+const projectDB = 'video';
+const recordDB = 'video-record'
+const loginSign = 'videoDev';
 export default {
   // use for cookie sign key, should change to your own and keep security
   keys: '1697684406848_4978',
   loginSign,
   koa: {
-    port: 9700,
-    globalPrefix: '/ts/frame/api',
+    port: 20001,
+    globalPrefix: '/video/api',
   },
   swagger: {
     swaggerPath: '/doc/api',
@@ -21,13 +21,6 @@ export default {
     secret: 'Ziyouyanfa!@#',
     expiresIn: 3600, // 3600
   },
-  elasticsearch: {
-    node: 'http://192.168.1.197:9200',
-    auth: {
-      username: 'elastic',
-      password: 'NAjqFz_7tS2DkdpU7p*x',
-    },
-  },
   dbName: projectDB,
   mongoose: {
     dataSource: {

+ 4 - 11
src/config/config.prod.ts

@@ -3,27 +3,20 @@ const ip = 'host.docker.internal';
 const redisHost = ip;
 const redisPwd = '123456';
 const redisDB = 1;
-const projectDB = 'vue3js-template-test';
-const loginSign = 'information_platform';
+const projectDB = 'video';
+const loginSign = 'video_demand';
 export default {
   // use for cookie sign key, should change to your own and keep security
   keys: '1697684406848_4978',
   loginSign,
   koa: {
-    port: 9700,
-    globalPrefix: '/ts/frame/api',
+    port: 20001,
+    globalPrefix: '/video/api',
   },
   jwt: {
     secret: 'Ziyouyanfa!@#',
     expiresIn: 3600, // 3600
   },
-  elasticsearch: {
-    node: 'http://localhost:9200',
-    auth: {
-      username: 'elastic',
-      password: 'NAjqFz_7tS2DkdpU7p*x',
-    },
-  },
   dbName: projectDB,
   mongoose: {
     dataSource: {

+ 1 - 10
src/configuration.ts

@@ -1,4 +1,4 @@
-import { Configuration, App, Inject, MidwayDecoratorService, IMidwayContainer, IMidwayApplication } from '@midwayjs/core';
+import { Configuration, App, Inject, MidwayDecoratorService } from '@midwayjs/core';
 import * as koa from '@midwayjs/koa';
 import * as validate from '@midwayjs/validate';
 import * as info from '@midwayjs/info';
@@ -15,9 +15,7 @@ import { newsQueryMiddleware } from './middleware/newsQuery.middleware';
 import * as i18n from '@midwayjs/i18n';
 import { SetLocaleToCtxMiddleware } from './middleware/setLocaleToCtx.middleware';
 import * as bull from '@midwayjs/bull';
-import { ElasticsearchService } from './service/elasticsearch';
 import { DataRecordMiddleware } from './middleware/dataRecord.middleware';
-import { DBService } from './service/db.service';
 @Configuration({
   imports: [
     koa,
@@ -54,11 +52,4 @@ export class MainConfiguration {
     VerifyTokenInit(this.decoratorService);
     CheckPermissionCodeInit(this.decoratorService);
   }
-  // 应用服务已启动后执行
-  async onServerReady?(container: IMidwayContainer, app: IMidwayApplication) {
-    // 初始化es
-    const esService = await container.getAsync(ElasticsearchService);
-    // await esService.preparMapping();
-    // await container.getAsync(DBService);
-  }
 }

+ 0 - 83
src/controller/platform/achievement.controller.ts

@@ -1,83 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { AchievementService } from '../../service/platform/achievement.service';
-import { CDTO_achievement, CVO_achievement, FVO_achievement, QDTO_achievement, QVO_achievement, UDTO_achievement, UVAO_achievement } from '../../interface/platform/achievement.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['成果'])
-@Controller('/achievement')
-export class AchievementController extends BaseController {
-  @Inject()
-  service: AchievementService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_achievement })
-  async create(@Body() data: CDTO_achievement) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_achievement(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_achievement })
-  async query(@Query() filter: QDTO_achievement, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_achievement(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/list')
-  async list() {
-    const list = await this.service.list(this.ctx.filter);
-    const data = list.data;
-    const total = list.total;
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_achievement })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_achievement(data);
-    return result;
-  }
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_achievement })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_achievement })
-  async update(@Param('id') id: string, @Body() body: UDTO_achievement) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 78
src/controller/platform/chat.controller.ts

@@ -1,78 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { ChatService } from '../../service/platform/chat.service';
-import { CDTO_chat, CVO_chat, FVO_chat, QVO_chat, UDTO_chat, UVAO_chat } from '../../interface/platform/chat.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['聊天记录'])
-@Controller('/chat')
-export class ChatController extends BaseController {
-  @Inject()
-  service: ChatService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_chat })
-  async create(@Body() data: CDTO_chat) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_chat(dbData);
-    await this.service.createAfter(result);
-    return result;
-  }
-
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_chat })
-  async query(@Query() filter) {
-    const list = await this.service.query(filter);
-    return list;
-  }
-
-  @Get('/read')
-  @ApiQuery({ name: 'query' })
-  async user(@Query() filter: any) {
-    const result = await this.service.read(filter);
-    return result;
-  }
-
-  @Get('/chat')
-  @ApiQuery({ name: 'query' })
-  async chat(@Query() filter) {
-    const list = await this.service.chat(filter);
-    return list;
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_chat })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_chat(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_chat })
-  async update(@Param('id') id: string, @Body() body: UDTO_chat) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 76
src/controller/platform/collection.controller.ts

@@ -1,76 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { CollectionService } from '../../service/platform/collection.service';
-import { CDTO_collection, CVO_collection, FVO_collection, QDTO_collection, QVO_collection, UDTO_collection, UVAO_collection } from '../../interface/platform/collection.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['收藏'])
-@Controller('/collection')
-export class CollectionController extends BaseController {
-  @Inject()
-  service: CollectionService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_collection })
-  async create(@Body() data: CDTO_collection) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_collection(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_collection })
-  async query(@Query() filter: QDTO_collection, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_collection(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_collection })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_collection(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_collection })
-  async update(@Param('id') id: string, @Body() body: UDTO_collection) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-
-  @Post('/cancel')
-  @Validate()
-  @ApiResponse({ type: CVO_collection })
-  async cancel(@Body() data: CDTO_collection) {
-    await this.service.cancel(data);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 83
src/controller/platform/demand.controller.ts

@@ -1,83 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { DemandService } from '../../service/platform/demand.service';
-import { CDTO_demand, CVO_demand, FVO_demand, QDTO_demand, QVO_demand, UDTO_demand, UVAO_demand } from '../../interface/platform/demand.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['需求'])
-@Controller('/demand')
-export class DemandController extends BaseController {
-  @Inject()
-  service: DemandService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_demand })
-  async create(@Body() data: CDTO_demand) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_demand(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_demand })
-  async query(@Query() filter: QDTO_demand, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_demand(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/list')
-  async list() {
-    const list = await this.service.list(this.ctx.filter);
-    const data = list.data;
-    const total = list.total;
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_demand })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_demand(data);
-    return result;
-  }
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_demand })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_demand })
-  async update(@Param('id') id: string, @Body() body: UDTO_demand) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 68
src/controller/platform/design.controller.ts

@@ -1,68 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { DesignService } from '../../service/platform/design.service';
-import { CDTO_design, CVO_design, FVO_design, QDTO_design, QVO_design, UDTO_design, UVAO_design } from '../../interface/platform/design.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['平台设置'])
-@Controller('/design')
-export class DesignController extends BaseController {
-  @Inject()
-  service: DesignService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_design })
-  async create(@Body() data: CDTO_design) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_design(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_design })
-  async query(@Query() filter: QDTO_design, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_design(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_design })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_design(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_design })
-  async update(@Param('id') id: string, @Body() body: UDTO_design) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 75
src/controller/platform/match.controller.ts

@@ -1,75 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { MatchService } from '../../service/platform/match.service';
-import { CDTO_match, CVO_match, FVO_match, QDTO_match, QVO_match, UDTO_match, UVAO_match } from '../../interface/platform/match.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['创新大赛'])
-@Controller('/match')
-export class MatchController extends BaseController {
-  @Inject()
-  service: MatchService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_match })
-  async create(@Body() data: CDTO_match) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_match(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_match })
-  async query(@Query() filter: QDTO_match, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_match(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_match })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_match(data);
-    return result;
-  }
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_match })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_match })
-  async update(@Param('id') id: string, @Body() body: UDTO_match) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 71
src/controller/platform/news.controller.ts

@@ -1,71 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { NewsService } from '../../service/platform/news.service';
-import { CDTO_news, CVO_news, FVO_news, QDTO_news, QVO_news, UDTO_news, UVAO_news } from '../../interface/platform/news.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['新闻'])
-@Controller('/news')
-export class NewsController extends BaseController {
-  @Inject()
-  service: NewsService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_news })
-  async create(@Body() data: CDTO_news) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_news(dbData);
-    return result;
-  }
-
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_news })
-  async query(@Query() filter: QDTO_news, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_news(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_news })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    // 加浏览量
-    await this.service.fetchBrowse(data);
-    const result = new FVO_news(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_news })
-  async update(@Param('id') id: string, @Body() body: UDTO_news) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 83
src/controller/platform/project.controller.ts

@@ -1,83 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { ProjectService } from '../../service/platform/project.service';
-import { CDTO_project, CVO_project, FVO_project, QDTO_project, QVO_project, UDTO_project, UVAO_project } from '../../interface/platform/project.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['项目'])
-@Controller('/project')
-export class ProjectController extends BaseController {
-  @Inject()
-  service: ProjectService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_project })
-  async create(@Body() data: CDTO_project) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_project(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_project })
-  async query(@Query() filter: QDTO_project, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_project(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/list')
-  async list() {
-    const list = await this.service.list(this.ctx.filter);
-    const data = list.data;
-    const total = list.total;
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_project })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_project(data);
-    return result;
-  }
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_project })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_project })
-  async update(@Param('id') id: string, @Body() body: UDTO_project) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 75
src/controller/platform/sign.controller.ts

@@ -1,75 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { SignService } from '../../service/platform/sign.service';
-import { CDTO_sign, CVO_sign, FVO_sign, QDTO_sign, QVO_sign, UDTO_sign, UVAO_sign } from '../../interface/platform/sign.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['赛事报名表'])
-@Controller('/sign')
-export class SignController extends BaseController {
-  @Inject()
-  service: SignService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_sign })
-  async create(@Body() data: CDTO_sign) {
-    await this.service.createExamine(data);
-    const dbData = await this.service.create(data);
-    const result = new CVO_sign(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_sign })
-  async query(@Query() filter: QDTO_sign, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_sign(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/sign')
-  async sign(@Query() filter) {
-    const list = await this.service.sign(filter);
-    return list;
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_sign })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_sign(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_sign })
-  async update(@Param('id') id: string, @Body() body: UDTO_sign) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 84
src/controller/platform/supply.controller.ts

@@ -1,84 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { SupplyService } from '../../service/platform/supply.service';
-import { CDTO_supply, CVO_supply, FVO_supply, QDTO_supply, QVO_supply, UDTO_supply, UVAO_supply } from '../../interface/platform/supply.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['供给'])
-@Controller('/supply')
-export class SupplyController extends BaseController {
-  @Inject()
-  service: SupplyService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_supply })
-  async create(@Body() data: CDTO_supply) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_supply(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_supply })
-  async query(@Query() filter: QDTO_supply, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_supply(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/list')
-  async list() {
-    const list = await this.service.list(this.ctx.filter);
-    const data = list.data;
-    const total = list.total;
-    return { data, total };
-  }
-
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_supply })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_supply })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_supply(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_supply })
-  async update(@Param('id') id: string, @Body() body: UDTO_supply) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 68
src/controller/platform/tags.controller.ts

@@ -1,68 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { TagsService } from '../../service/platform/tags.service';
-import { CDTO_tags, CVO_tags, FVO_tags, QDTO_tags, QVO_tags, UDTO_tags, UVAO_tags } from '../../interface/platform/tags.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['标签'])
-@Controller('/tags')
-export class TagsController extends BaseController {
-  @Inject()
-  service: TagsService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_tags })
-  async create(@Body() data: CDTO_tags) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_tags(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_tags })
-  async query(@Query() filter: QDTO_tags, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit, sort: { sort: 1 } });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_tags(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_tags })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_tags(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_tags })
-  async update(@Param('id') id: string, @Body() body: UDTO_tags) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 27
src/controller/tool.controller.ts

@@ -6,31 +6,4 @@ import { ToolService } from '../service/tool.service';
 export class ToolController {
   @Inject()
   service: ToolService;
-
-  @Get('/getTotal')
-  @ApiResponse({})
-  async getTotal(@Query() filter) {
-    const result = await this.service.getTotal(filter);
-    return result;
-  }
-
-  @Get('/query')
-  @ApiResponse({})
-  async query(@Query() filter) {
-    const result = await this.service.query(filter);
-    return result;
-  }
-
-  @Get('/CollectionTotal')
-  @ApiResponse({})
-  async getCollectionTotal() {
-    const result = await this.service.getCollectionTotal();
-    return result;
-  }
-  @Get('/MyCollection')
-  @ApiResponse({})
-  async MyCollection(@Query() filter) {
-    const result = await this.service.getCollection(filter);
-    return result;
-  }
 }

+ 0 - 73
src/controller/users/association.controller.ts

@@ -1,73 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { AssociationService } from '../../service/users/association.service';
-import { CDTO_association, CVO_association, FVO_association, QDTO_association, QVO_association, UDTO_association, UVAO_association } from '../../interface/users/association.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['商协会'])
-@Controller('/association')
-export class AssociationController extends BaseController {
-  @Inject()
-  service: AssociationService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_association })
-  async create(@Body() data: CDTO_association) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_association(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_association })
-  async query(@Query() filter: QDTO_association, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_association(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_association })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_association(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_association })
-  async update(@Param('id') id: string, @Body() body: UDTO_association) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Association');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 88
src/controller/users/company.controller.ts

@@ -1,88 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { CompanyService } from '../../service/users/company.service';
-import { CDTO_company, CVO_company, FVO_company, QDTO_company, QVO_company, UDTO_company, UVAO_company } from '../../interface/users/company.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['企业'])
-@Controller('/company')
-export class CompanyController extends BaseController {
-  @Inject()
-  service: CompanyService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_company })
-  async create(@Body() data: CDTO_company) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_company(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_company })
-  async query(@Query() filter: QDTO_company, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_company(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/list')
-  async list() {
-    const list = await this.service.list(this.ctx.filter);
-    const data = list.data;
-    const total = list.total;
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_company })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_company(data);
-    return result;
-  }
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_company })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_company })
-  async update(@Param('id') id: string, @Body() body: UDTO_company) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Company');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 73
src/controller/users/competition.controller.ts

@@ -1,73 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { CompetitionService } from '../../service/users/competition.service';
-import { CDTO_competition, CVO_competition, FVO_competition, QDTO_competition, QVO_competition, UDTO_competition, UVAO_competition } from '../../interface/users/competition.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['创业大赛'])
-@Controller('/competition')
-export class CompetitionController extends BaseController {
-  @Inject()
-  service: CompetitionService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_competition })
-  async create(@Body() data: CDTO_competition) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_competition(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_competition })
-  async query(@Query() filter: QDTO_competition, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_competition(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_competition })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_competition(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_competition })
-  async update(@Param('id') id: string, @Body() body: UDTO_competition) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Competition');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 88
src/controller/users/expert.controller.ts

@@ -1,88 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { ExpertService } from '../../service/users/expert.service';
-import { CDTO_expert, CVO_expert, FVO_expert, QDTO_expert, QVO_expert, UDTO_expert, UVAO_expert } from '../../interface/users/expert.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['专家'])
-@Controller('/expert')
-export class ExpertController extends BaseController {
-  @Inject()
-  service: ExpertService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_expert })
-  async create(@Body() data: CDTO_expert) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_expert(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_expert })
-  async query(@Query() filter: QDTO_expert, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_expert(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/list')
-  async list() {
-    const list = await this.service.list(this.ctx.filter);
-    const data = list.data;
-    const total = list.total;
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_expert })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_expert(data);
-    return result;
-  }
-
-  @Get('/detail/:id')
-  @ApiResponse({ type: FVO_expert })
-  async detail(@Param('id') id: string) {
-    const data = await this.service.detail(id);
-    return data;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_expert })
-  async update(@Param('id') id: string, @Body() body: UDTO_expert) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Expert');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 73
src/controller/users/incubator.controller.ts

@@ -1,73 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { IncubatorService } from '../../service/users/incubator.service';
-import { CDTO_incubator, CVO_incubator, FVO_incubator, QDTO_incubator, QVO_incubator, UDTO_incubator, UVAO_incubator } from '../../interface/users/incubator.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['孵化器'])
-@Controller('/incubator')
-export class IncubatorController extends BaseController {
-  @Inject()
-  service: IncubatorService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_incubator })
-  async create(@Body() data: CDTO_incubator) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_incubator(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_incubator })
-  async query(@Query() filter: QDTO_incubator, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_incubator(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_incubator })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_incubator(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_incubator })
-  async update(@Param('id') id: string, @Body() body: UDTO_incubator) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Incubator');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 73
src/controller/users/investment.controller.ts

@@ -1,73 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { InvestmentService } from '../../service/users/investment.service';
-import { CDTO_investment, CVO_investment, FVO_investment, QDTO_investment, QVO_investment, UDTO_investment, UVAO_investment } from '../../interface/users/investment.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['投资人'])
-@Controller('/investment')
-export class InvestmentController extends BaseController {
-  @Inject()
-  service: InvestmentService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_investment })
-  async create(@Body() data: CDTO_investment) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_investment(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_investment })
-  async query(@Query() filter: QDTO_investment, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_investment(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_investment })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_investment(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_investment })
-  async update(@Param('id') id: string, @Body() body: UDTO_investment) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Investment');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 73
src/controller/users/state.controller.ts

@@ -1,73 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { StateService } from '../../service/users/state.service';
-import { CDTO_state, CVO_state, FVO_state, QDTO_state, QVO_state, UDTO_state, UVAO_state } from '../../interface/users/state.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['政府部门'])
-@Controller('/state')
-export class StateController extends BaseController {
-  @Inject()
-  service: StateService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_state })
-  async create(@Body() data: CDTO_state) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_state(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_state })
-  async query(@Query() filter: QDTO_state, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_state(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_state })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_state(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_state })
-  async update(@Param('id') id: string, @Body() body: UDTO_state) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'State');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 73
src/controller/users/unit.controller.ts

@@ -1,73 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { UnitService } from '../../service/users/unit.service';
-import { CDTO_unit, CVO_unit, FVO_unit, QDTO_unit, QVO_unit, UDTO_unit, UVAO_unit } from '../../interface/users/unit.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-import { UtilService } from '../../service/util.service';
-@ApiTags(['科研机构'])
-@Controller('/unit')
-export class UnitController extends BaseController {
-  @Inject()
-  service: UnitService;
-
-  @Inject()
-  utilService: UtilService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_unit })
-  async create(@Body() data: CDTO_unit) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_unit(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_unit })
-  async query(@Query() filter: QDTO_unit, @Query('skip') skip: number, @Query('limit') limit: number) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_unit(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_unit })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_unit(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_unit })
-  async update(@Param('id') id: string, @Body() body: UDTO_unit) {
-    const result = await this.service.updateOne(id, body);
-    await this.utilService.updateUserAfter(id, body, 'Unit');
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 65
src/entity/basic.entity.ts

@@ -1,65 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'basic' },
-})
-export class Basic extends BaseModel {
-  @prop({ required: false, index: true, zh: '实验室类别', remark: '字典:laboratory_type' })
-  type: string;
-  @prop({ required: false, index: true, zh: '实验室名称' })
-  name: string;
-  @prop({ required: false, index: false, zh: '英文名称' })
-  english_name: string;
-  @prop({ required: false, index: false, zh: '所属学科' })
-  subject: string;
-  @prop({ required: false, index: false, zh: '所属专业' })
-  major: string;
-  @prop({ required: false, index: false, zh: '实验室面积' })
-  lab_acreage: string;
-  @prop({ required: false, index: false, zh: '批建时间' })
-  build_time: string;
-  @prop({ required: false, index: false, zh: '实验室地址' })
-  lab_address: string;
-  @prop({ required: false, index: false, zh: '依托单位id', remark: 'unit_name不需要了,现在所有的实验室都有依托单位' })
-  unit: string;
-  @prop({ required: false, index: false, zh: '实验室定位' })
-  position: string;
-  @prop({ required: false, index: false, zh: '实验室建设方案' })
-  plan: Array<any>;
-  @prop({ required: false, index: false, zh: '实验室主任' })
-  chief_name: string;
-  @prop({ required: false, index: false, zh: '实验室联系人' })
-  lab_person: string;
-  @prop({ required: false, index: false, zh: '实验室联系人电话' })
-  lab_phone: string;
-  @prop({ required: false, index: false, zh: '电子邮箱' })
-  lab_email: string;
-  @prop({ required: false, index: false, zh: '申报单位' })
-  declare_unit: object;
-  @prop({ required: false, index: false, zh: '平台负责人' })
-  leading_cadre: object;
-  @prop({ required: false, index: false, zh: '科研助理' })
-  assistant: object;
-  @prop({ required: false, index: false, zh: '财务助理是否与科研助理同一人' })
-  is_alike: boolean;
-  @prop({ required: false, index: false, zh: '财务助理' })
-  finance: object;
-  @prop({ required: false, index: false, zh: '所属吉林省重点实验室' })
-  ss_laboratory: string;
-  @prop({ required: false, index: false, zh: '整合基础' })
-  zh_basis: string;
-  @prop({ required: false, index: false, zh: '是否公开', remark: '字典:info_show' })
-  is_show: string;
-  @prop({ required: false, index: false, zh: '地区' })
-  region: string;
-  @prop({ required: false, index: true, zh: '状态', default: '2' })
-  status: string;
-  @prop({ required: false, index: false, zh: '主任入驻记录' })
-  chief_logs: Array<any>;
-  @prop({ required: false, index: false, zh: '发展前景' })
-  develop: string;
-  @prop({ required: false, index: false, zh: '运行机制' })
-  mechanism: string;
-  @prop({ required: false, index: false, zh: '运行机制文件' })
-  mechanism_file: Array<any>;
-}

+ 0 - 39
src/entity/platform/achievement.entity.ts

@@ -1,39 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'achievement' },
-})
-export class Achievement extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '专利号' })
-  patent: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '属性' })
-  attribute: string;
-  @prop({ required: false, index: true, zh: '出让方式' })
-  sell: string;
-  @prop({ required: false, index: true, zh: '成熟度' })
-  mature: string;
-  @prop({ required: false, index: true, zh: '行业领域' })
-  field: string;
-  @prop({ required: false, index: true, zh: '技术分类' })
-  technology: string;
-  @prop({ required: false, index: true, zh: '成果地区' })
-  area: Array<any>;
-  @prop({ required: false, index: false, zh: '发布时间' })
-  time: string;
-  @prop({ required: false, index: true, zh: '参考价格' })
-  money: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '附件' })
-  file: Array<any>;
-  @prop({ required: false, index: true, zh: '成果状态', default: '0' })
-  achievement_status: string;
-  @prop({ required: false, index: true, zh: '是否公开', default: '1' })
-  is_use: string;
-  @prop({ required: false, index: true, zh: '状态' , default: '0'})
-  status: string;
-}

+ 0 - 19
src/entity/platform/chat.entity.ts

@@ -1,19 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'chat' },
-})
-export class Chat extends BaseModel {
-  @prop({ required: false, index: true, zh: '发送者id' })
-  sender_id: string;
-  @prop({ required: false, index: false, zh: '接收者id' })
-  receiver_id: string;
-  @prop({ required: false, index: false, zh: '内容类型' })
-  type: string;
-  @prop({ required: false, index: true, zh: '内容' })
-  content: string;
-  @prop({ required: false, index: false, zh: '发送时间' })
-  send_time: string;
-  @prop({ required: false, index: false, zh: '是否已读', default: '0' })
-  is_read: string;
-}

+ 0 - 15
src/entity/platform/collection.entity.ts

@@ -1,15 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'collection' },
-})
-export class Collection extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '来源id' })
-  source: string;
-  @prop({ required: false, index: true, zh: '类型' })
-  type: string;
-  @prop({ required: false, index: false, zh: '收藏时间' })
-  time: string;
-}

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

@@ -1,33 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'demand' },
-})
-export class Demand extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '类型' })
-  type: string;
-  @prop({ required: false, index: true, zh: '行业领域' })
-  field: string;
-  @prop({ required: false, index: false, zh: '需求紧急度' })
-  urgent: string;
-  @prop({ required: false, index: true, zh: '合作方式' })
-  method: string;
-  @prop({ required: false, index: false, zh: '有效期' })
-  time: Array<any>;
-  @prop({ required: false, index: false, zh: '价格' })
-  money: string;
-  @prop({ required: false, index: true, zh: '需求地区' })
-  area: Array<any>;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '需求状态', default: '0' })
-  demand_status: string;
-  @prop({ required: false, index: true, zh: '是否公开', default: '1' })
-  is_use: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 23
src/entity/platform/design.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'design' },
-})
-export class Design extends BaseModel {
-  @prop({ required: false, index: false, zh: '标题' })
-  zhTitle: string;
-  @prop({ required: false, index: false, zh: '英文标题' })
-  zhEnglish: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  zhBrief: string;
-  @prop({ required: false, index: false, zh: '使用协议' })
-  agreement: string;
-  @prop({ required: false, index: false, zh: '关于我们' })
-  brief: string;
-  @prop({ required: false, index: false, zh: 'logo' })
-  logoUrl: Array<any>;
-  @prop({ required: false, index: false, zh: '视频' })
-  videoUrl: Array<any>;
-  @prop({ required: false, index: false, zh: '网站底部信息' })
-  footInfo: object;
-}

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

@@ -1,35 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'match' },
-})
-export class Match extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '类型' })
-  type: string;
-  @prop({ required: false, index: true, zh: '组织单位' })
-  work: string;
-  @prop({ required: false, index: true, zh: '行业' })
-  industry: string;
-  @prop({ required: false, index: true, zh: '类别' })
-  form: string;
-  @prop({ required: false, index: false, zh: '有效期' })
-  time: Array<any>;
-  @prop({ required: false, index: false, zh: '奖金' })
-  money: string;
-  @prop({ required: false, index: false, zh: '赛事规则', default: {} })
-  rules: object;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '封面' })
-  file: Array<any>;
-  @prop({ required: false, index: true, zh: '赛事状态', default: '0' })
-  match_status: string;
-  @prop({ required: false, index: true, zh: '是否公开', default: '1' })
-  is_use: string;
-  @prop({ required: false, index: true, zh: '状态', default: '0' })
-  status: string;
-}

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

@@ -1,25 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'news' },
-})
-export class News extends BaseModel {
-  @prop({ required: false, index: true, zh: '标题' })
-  title: string;
-  @prop({ required: false, index: true, zh: '封面' })
-  logo: Array<any>;
-  @prop({ required: false, index: false, zh: '发布人' })
-  person: string;
-  @prop({ required: false, index: false, zh: '发布时间' })
-  time: string;
-  @prop({ required: false, index: false, zh: '内容' })
-  content: string;
-  @prop({ required: false, index: false, zh: '浏览次数', default: 0 })
-  number: number;
-  @prop({ required: false, index: false, zh: '类型', remark: '0:政策新闻,1:新闻资讯', default: '0' })
-  type: string;
-  @prop({ required: false, index: true, zh: '是否使用', default: '1' })
-  is_use: string;
-  @prop({ required: false, index: true, zh: '状态' , default: '0'})
-  status: string;
-}

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

@@ -1,31 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'project' },
-})
-export class Project extends BaseModel {
-  @prop({ required: false, index: false, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '发布时间' })
-  time: string;
-  @prop({ required: false, index: true, zh: '行业分类' })
-  type: string;
-  @prop({ required: false, index: true, zh: '成熟度' })
-  maturity: string;
-  @prop({ required: false, index: true, zh: '技术类型' })
-  skill: string;
-  @prop({ required: false, index: true, zh: '领域' })
-  field: string;
-  @prop({ required: false, index: true, zh: '合作类型' })
-  cooperate: string;
-  @prop({ required: false, index: true, zh: '项目地区' })
-  area: Array<any>;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '是否公开' })
-  is_use: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 27
src/entity/platform/sign.entity.ts

@@ -1,27 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'sign' },
-})
-export class Sign extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '赛事id' })
-  match: string;
-  @prop({ required: false, index: true, zh: '姓名' })
-  name: string;
-  @prop({ required: false, index: false, zh: '电话号' })
-  phone: string;
-  @prop({ required: false, index: false, zh: '证件类型' })
-  cardType: string;
-  @prop({ required: false, index: false, zh: '证件号码' })
-  card: string;
-  @prop({ required: false, index: false, zh: '微信/QQ' })
-  communication: string;
-  @prop({ required: false, index: false, zh: '电子邮箱' })
-  email: string;
-  @prop({ required: false, index: false, zh: '报名时间' })
-  time: string;
-  @prop({ required: false, index: false, zh: '备注' })
-  remark: string;
-}

+ 0 - 33
src/entity/platform/supply.entity.ts

@@ -1,33 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'supply' },
-})
-export class Supply extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '类型' })
-  type: string;
-  @prop({ required: false, index: true, zh: '行业领域' })
-  field: string;
-  @prop({ required: false, index: false, zh: '需求紧急度' })
-  urgent: string;
-  @prop({ required: false, index: true, zh: '合作方式' })
-  method: string;
-  @prop({ required: false, index: false, zh: '有效期' })
-  time: Array<any>;
-  @prop({ required: false, index: false, zh: '价格' })
-  money: string;
-  @prop({ required: false, index: true, zh: '需求地区' })
-  area: Array<any>;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '需求状态', default: '0' })
-  demand_status: string;
-  @prop({ required: false, index: true, zh: '是否公开', default: '1' })
-  is_use: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 23
src/entity/platform/tags.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'tags' },
-})
-export class Tags extends BaseModel {
-  @prop({ required: false, index: true, zh: '标题' })
-  title: string;
-  @prop({ required: false, index: true, zh: '类型', default: '1' })
-  type: string;
-  @prop({ required: false, index: false, zh: '路由' })
-  href: string;
-  @prop({ required: false, index: false, zh: '英文标题' })
-  English: string;
-  @prop({ required: false, index: false, zh: '子菜单' })
-  children: Array<any>;
-  @prop({ required: false, index: false, zh: '排序' })
-  sort: number;
-  @prop({ required: false, index: false, zh: '备注' })
-  remark: string;
-  @prop({ required: false, index: false, zh: '是否使用', default: '0' })
-  is_use: string;
-}

+ 0 - 23
src/entity/users/association.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'association' },
-})
-export class Association extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: false, zh: '负责人' })
-  person: string;
-  @prop({ required: false, index: true, zh: '负责人电话' })
-  person_phone: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '地址' })
-  address: string;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

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

@@ -1,45 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'company' },
-})
-export class Company extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '企业名称' })
-  name: string;
-  @prop({ required: false, index: false, zh: 'logo' })
-  logo: Array<any>;
-  @prop({ required: false, index: false, zh: '统一信用代码' })
-  code: string;
-  @prop({ required: false, index: false, zh: '企业类型' })
-  pattern: string;
-  @prop({ required: false, index: false, zh: '企业规模' })
-  scale: string;
-  @prop({ required: false, index: true, zh: '联系电话' })
-  phone: string;
-  @prop({ required: false, index: true, zh: '所属行业' })
-  type: string;
-  @prop({ required: false, index: true, zh: '所在地区' })
-  area: Array<any>;
-  @prop({ required: false, index: false, zh: '法定代表人' })
-  representative: string;
-  @prop({ required: false, index: false, zh: '电子邮箱' })
-  email: string;
-  @prop({ required: false, index: true, zh: '员工人数' })
-  person: number;
-  @prop({ required: false, index: false, zh: '注册资本' })
-  register: string;
-  @prop({ required: false, index: false, zh: '成立日期' })
-  create_time: string;
-  @prop({ required: false, index: false, zh: '地址' })
-  address: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '公司状态', default: '0' })
-  companyStatus: string;
-  @prop({ required: false, index: true, zh: '状态', default: '0' })
-  status: string;
-}

+ 0 - 23
src/entity/users/competition.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'competition' },
-})
-export class Competition extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '负责人名称' })
-  person: string;
-  @prop({ required: false, index: true, zh: '负责人电话' })
-  person_phone: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '地址' })
-  address: string;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 41
src/entity/users/expert.entity.ts

@@ -1,41 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'expert' },
-})
-export class Expert extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '专家姓名' })
-  name: string;
-  @prop({ required: false, index: false, zh: '头像' })
-  icon: Array<any>;
-  @prop({ required: false, index: true, zh: '性别' })
-  gender: string;
-  @prop({ required: false, index: false, zh: '出生年月' })
-  birth: string;
-  @prop({ required: false, index: false, zh: '证件类型' })
-  cardType: string;
-  @prop({ required: false, index: false, zh: '证件号码' })
-  card: string;
-  @prop({ required: false, index: true, zh: '联系电话' })
-  phone: string;
-  @prop({ required: false, index: true, zh: '所属领域' })
-  field: string;
-  @prop({ required: false, index: true, zh: '研究方向' })
-  direction: string;
-  @prop({ required: false, index: true, zh: '工作单位' })
-  work: string;
-  @prop({ required: false, index: true, zh: '学历' })
-  education: string;
-  @prop({ required: false, index: true, zh: '职称' })
-  title: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '所在地区' })
-  area: Array<any>;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态', default: '0' })
-  status: string;
-}

+ 0 - 23
src/entity/users/incubator.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'incubator' },
-})
-export class Incubator extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: false, zh: '负责人姓名' })
-  person: string;
-  @prop({ required: false, index: true, zh: '负责人电话' })
-  person_phone: string;
-  @prop({ required: false, index: false, zh: '地址' })
-  address: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '是否公开', default: '0' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态', default: '0' })
-  status: string;
-}

+ 0 - 29
src/entity/users/investment.entity.ts

@@ -1,29 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'investment' },
-})
-export class Investment extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '投资人姓名' })
-  name: string;
-  @prop({ required: false, index: false, zh: '投资人证件类型' })
-  cardType: string;
-  @prop({ required: false, index: false, zh: '投资人证件号码' })
-  card: string;
-  @prop({ required: false, index: false, zh: ' 投资人出资额' })
-  money: string;
-  @prop({ required: false, index: true, zh: '投资人出资方式' })
-  type: string;
-  @prop({ required: false, index: false, zh: '投资人的住所地' })
-  address: string;
-  @prop({ required: false, index: false, zh: '投资人的联系方式' })
-  phone: string;
-  @prop({ required: false, index: true, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 25
src/entity/users/state.entity.ts

@@ -1,25 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'state' },
-})
-export class State extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: false, zh: '负责人' })
-  person: string;
-  @prop({ required: false, index: false, zh: '负责人电话' })
-  person_phone: string;
-  @prop({ required: false, index: true, zh: '部门类型' })
-  type: string;
-  @prop({ required: false, index: true, zh: '地址' })
-  address: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 23
src/entity/users/unit.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'unit' },
-})
-export class Unit extends BaseModel {
-  @prop({ required: false, index: true, zh: '平台用户id' })
-  user: string;
-  @prop({ required: false, index: false, zh: '科研机构名称' })
-  name: string;
-  @prop({ required: false, index: true, zh: '联系人' })
-  person: string;
-  @prop({ required: false, index: true, zh: '联系电话' })
-  person_phone: string;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '地址' })
-  address: string;
-  @prop({ required: false, index: true, zh: '是否公开' })
-  is_show: string;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
-}

+ 0 - 160
src/interface/platform/achievement.interface.ts

@@ -1,160 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_achievement {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '专利号' })
-  'patent': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '属性' })
-  'attribute': string = undefined;
-  @ApiProperty({ description: '出让方式' })
-  'sell': string = undefined;
-  @ApiProperty({ description: '成熟度' })
-  'mature': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '技术分类' })
-  'technology': string = undefined;
-  @ApiProperty({ description: '成果地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '发布时间' })
-  'time': string = undefined;
-  @ApiProperty({ description: '参考价格' })
-  'money': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '附件' })
-  'file': Array<any> = undefined;
-  @ApiProperty({ description: '成果状态' })
-  'achievement_status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_achievement extends SearchBase {
-  constructor() {
-    const like_prop = ['name'];
-    const props = ['user', 'patent', 'name', 'attribute', 'sell', 'mature', 'field', 'technology', 'money', 'status', 'achievement_status', 'is_use'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '专利号' })
-  'patent': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '属性' })
-  'attribute': string = undefined;
-  @ApiProperty({ description: '出让方式' })
-  'sell': string = undefined;
-  @ApiProperty({ description: '成熟度' })
-  'mature': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '技术分类' })
-  'technology': string = undefined;
-  @ApiProperty({ description: '参考价格' })
-  'money': string = undefined;
-  @ApiProperty({ description: '成果状态' })
-  'achievement_status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_achievement extends FVO_achievement {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_achievement {
-  @ApiProperty({ description: '用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '专利号' })
-  @Rule(RuleType['string']().empty(''))
-  'patent': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '属性' })
-  @Rule(RuleType['string']().empty(''))
-  'attribute': string = undefined;
-  @ApiProperty({ description: '出让方式' })
-  @Rule(RuleType['string']().empty(''))
-  'sell': string = undefined;
-  @ApiProperty({ description: '成熟度' })
-  @Rule(RuleType['string']().empty(''))
-  'mature': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  @Rule(RuleType['string']().empty(''))
-  'field': string = undefined;
-  @ApiProperty({ description: '技术分类' })
-  @Rule(RuleType['string']().empty(''))
-  'technology': string = undefined;
-  @ApiProperty({ description: '成果地区' })
-  @Rule(RuleType['array']().empty(''))
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '发布时间' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
-  @ApiProperty({ description: '参考价格' })
-  @Rule(RuleType['string']().empty(''))
-  'money': 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' })
-  @Rule(RuleType['string']().empty(''))
-  'achievement_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-}
-
-export class CVO_achievement extends FVO_achievement {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_achievement extends CDTO_achievement {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_achievement extends FVO_achievement {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 90
src/interface/platform/chat.interface.ts

@@ -1,90 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_chat {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '发送者id' })
-  'sender_id': string = undefined;
-  @ApiProperty({ description: '接收者id' })
-  'receiver_id': string = undefined;
-  @ApiProperty({ description: '内容类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '内容' })
-  'content': string = undefined;
-  @ApiProperty({ description: '发送时间' })
-  'send_time': string = undefined;
-  @ApiProperty({ description: '是否已读' })
-  'is_read': string = undefined;
-}
-
-export class QDTO_chat extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['sender_id', 'content'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '发送者id' })
-  'sender_id': string = undefined;
-  @ApiProperty({ description: '内容' })
-  'content': string = undefined;
-}
-
-export class QVO_chat extends FVO_chat {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_chat {
-  @ApiProperty({ description: '发送者id' })
-  @Rule(RuleType['string']().empty(''))
-  'sender_id': string = undefined;
-  @ApiProperty({ description: '接收者id' })
-  @Rule(RuleType['string']().empty(''))
-  'receiver_id': string = undefined;
-  @ApiProperty({ description: '内容类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '内容' })
-  @Rule(RuleType['string']().empty(''))
-  'content': string = undefined;
-  @ApiProperty({ description: '发送时间' })
-  @Rule(RuleType['string']().empty(''))
-  'send_time': string = undefined;
-  @ApiProperty({ description: '是否已读' })
-  @Rule(RuleType['string']().empty(''))
-  'is_read': string = undefined;
-}
-
-export class CVO_chat extends FVO_chat {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_chat extends CDTO_chat {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_chat extends FVO_chat {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 82
src/interface/platform/collection.interface.ts

@@ -1,82 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_collection {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '来源id' })
-  'source': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '收藏时间' })
-  'time': string = undefined;
-}
-
-export class QDTO_collection extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'source', 'type'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '来源id' })
-  'source': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-}
-
-export class QVO_collection extends FVO_collection {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_collection {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '来源id' })
-  @Rule(RuleType['string']().empty(''))
-  'source': string = undefined;
-  @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '收藏时间' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
-}
-
-export class CVO_collection extends FVO_collection {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_collection extends CDTO_collection {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_collection extends FVO_collection {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

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

@@ -1,139 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_demand {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '需求紧急度' })
-  'urgent': string = undefined;
-  @ApiProperty({ description: '合作方式' })
-  'method': string = undefined;
-  @ApiProperty({ description: '有效期' })
-  'time': Array<any> = undefined;
-  @ApiProperty({ description: '价格' })
-  'money': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '需求状态' })
-  'demand_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-}
-
-export class QDTO_demand extends SearchBase {
-  constructor() {
-    const like_prop = ['name'];
-    const props = ['user', 'name', 'type', 'field', 'urgent', 'method', 'demand_status', 'status', 'is_use'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '合作方式' })
-  'method': string = undefined;
-  @ApiProperty({ description: '需求紧急度' })
-  'urgent': string = undefined;
-  @ApiProperty({ description: '需求状态' })
-  'demand_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-}
-
-export class QVO_demand extends FVO_demand {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_demand {
-  @ApiProperty({ description: '用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  @Rule(RuleType['string']().empty(''))
-  'field': string = undefined;
-  @ApiProperty({ description: '需求紧急度' })
-  @Rule(RuleType['string']().empty(''))
-  'urgent': string = undefined;
-  @ApiProperty({ description: '合作方式' })
-  @Rule(RuleType['string']().empty(''))
-  'method': string = undefined;
-  @ApiProperty({ description: '有效期' })
-  @Rule(RuleType['array']().empty(''))
-  'time': Array<any> = undefined;
-  @ApiProperty({ description: '价格' })
-  @Rule(RuleType['string']().empty(''))
-  'money': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  @Rule(RuleType['array']().empty(''))
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '需求状态' })
-  @Rule(RuleType['string']().empty(''))
-  'demand_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-}
-
-export class CVO_demand extends FVO_demand {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_demand extends CDTO_demand {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_demand extends FVO_demand {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 96
src/interface/platform/design.interface.ts

@@ -1,96 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_design {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '标题' })
-  'zhTitle': string = undefined;
-  @ApiProperty({ description: '英文标题' })
-  'zhEnglish': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'zhBrief': string = undefined;
-  @ApiProperty({ description: '使用协议' })
-  'agreement': string = undefined;
-  @ApiProperty({ description: '关于我们' })
-  'brief': string = undefined;
-  @ApiProperty({ description: 'logo' })
-  'logoUrl': Array<any> = undefined;
-  @ApiProperty({ description: '视频' })
-  'videoUrl': Array<any> = undefined;
-  @ApiProperty({ description: '网站底部信息' })
-  'footInfo': object = undefined;
-}
-
-export class QDTO_design extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = [];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-}
-
-export class QVO_design extends FVO_design {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_design {
-  @ApiProperty({ description: '标题' })
-  @Rule(RuleType['string']().empty(''))
-  'zhTitle': string = undefined;
-  @ApiProperty({ description: '英文标题' })
-  @Rule(RuleType['string']().empty(''))
-  'zhEnglish': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'zhBrief': string = undefined;
-  @ApiProperty({ description: '使用协议' })
-  @Rule(RuleType['string']().empty(''))
-  'agreement': string = undefined;
-  @ApiProperty({ description: '关于我们' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: 'logo' })
-  @Rule(RuleType['array']().empty(''))
-  'logoUrl': Array<any> = undefined;
-  @ApiProperty({ description: '视频' })
-  @Rule(RuleType['array']().empty(''))
-  'videoUrl': Array<any> = undefined;
-  @ApiProperty({ description: '网站底部信息' })
-  @Rule(RuleType['object']().empty(''))
-  'footInfo': object = undefined;
-}
-
-export class CVO_design extends FVO_design {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_design extends CDTO_design {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_design extends FVO_design {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

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

@@ -1,142 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_match {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '组织单位' })
-  'work': string = undefined;
-  @ApiProperty({ description: '行业' })
-  'industry': string = undefined;
-  @ApiProperty({ description: '类别' })
-  'form': string = undefined;
-  @ApiProperty({ description: '有效期' })
-  'time': Array<any> = undefined;
-  @ApiProperty({ description: '奖金' })
-  'money': string = undefined;
-  @ApiProperty({ description: '赛事规则' })
-  'rules': object = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '封面' })
-  'file': Array<any> = undefined;
-  @ApiProperty({ description: '赛事状态' })
-  'match_status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_match extends SearchBase {
-  constructor() {
-    const like_prop = ['name'];
-    const props = ['user', 'industry', 'name', 'type', 'status', 'form', 'match_status', 'is_use'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '行业' })
-  'industry': string = undefined;
-  @ApiProperty({ description: '类别' })
-  'form': string = undefined;
-  @ApiProperty({ description: '赛事状态' })
-  'match_status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_match extends FVO_match {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_match {
-  @ApiProperty({ description: '用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '组织单位' })
-  @Rule(RuleType['string']().empty(''))
-  'work': string = undefined;
-  @ApiProperty({ description: '行业' })
-  @Rule(RuleType['string']().empty(''))
-  'industry': string = undefined;
-  @ApiProperty({ description: '类别' })
-  @Rule(RuleType['string']().empty(''))
-  'form': string = undefined;
-  @ApiProperty({ description: '有效期' })
-  @Rule(RuleType['array']().empty(''))
-  'time': Array<any> = undefined;
-  @ApiProperty({ description: '奖金' })
-  @Rule(RuleType['string']().empty(''))
-  'money': string = undefined;
-  @ApiProperty({ description: '赛事规则' })
-  @Rule(RuleType['object']().empty(''))
-  'rules': object = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '封面' })
-  @Rule(RuleType['array']().empty(''))
-  'file': Array<any> = undefined;
-  @ApiProperty({ description: '赛事状态' })
-  @Rule(RuleType['string']().empty(''))
-  'match_status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_match extends FVO_match {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_match extends CDTO_match {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_match extends FVO_match {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

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

@@ -1,113 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_news {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '标题' })
-  'title': string = undefined;
-  @ApiProperty({ description: '封面' })
-  'logo': Array<any> = undefined;
-  @ApiProperty({ description: '发布人' })
-  'person': string = undefined;
-  @ApiProperty({ description: '发布时间' })
-  'time': string = undefined;
-  @ApiProperty({ description: '内容' })
-  'content': string = undefined;
-  @ApiProperty({ description: '浏览次数' })
-  'number': number = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_news extends SearchBase {
-  constructor() {
-    const like_prop = ['title'];
-    const props = ['title', 'person', 'time', 'type', 'is_use', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '标题' })
-  'title': string = undefined;
-  @ApiProperty({ description: '发布人' })
-  'person': string = undefined;
-  @ApiProperty({ description: '发布时间' })
-  'time': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_news extends FVO_news {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_news {
-  @ApiProperty({ description: '标题' })
-  @Rule(RuleType['string']().empty(''))
-  'title': string = undefined;
-  @ApiProperty({ description: '封面' })
-  @Rule(RuleType['array']().empty(''))
-  'logo': Array<any> = undefined;
-  @ApiProperty({ description: '发布人' })
-  @Rule(RuleType['string']().empty(''))
-  'person': string = undefined;
-  @ApiProperty({ description: '发布时间' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
-  @ApiProperty({ description: '内容' })
-  @Rule(RuleType['string']().empty(''))
-  'content': string = undefined;
-  @ApiProperty({ description: '浏览次数' })
-  @Rule(RuleType['number']().empty(''))
-  'number': number = undefined;
-  @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_news extends FVO_news {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_news extends CDTO_news {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_news extends FVO_news {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 137
src/interface/platform/project.interface.ts

@@ -1,137 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_project {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '发布时间' })
-  'time': string = undefined;
-  @ApiProperty({ description: '行业分类' })
-  'type': string = undefined;
-  @ApiProperty({ description: '成熟度' })
-  'maturity': string = undefined;
-  @ApiProperty({ description: '技术类型' })
-  'skill': string = undefined;
-  @ApiProperty({ description: '领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '合作类型' })
-  'cooperate': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_project extends SearchBase {
-  constructor() {
-    const like_prop = ['name'];
-    const props = ['user', 'name', 'time', 'type', 'maturity', 'skill', 'field', 'cooperate', 'status', 'is_use'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '发布时间' })
-  'time': string = undefined;
-  @ApiProperty({ description: '行业分类' })
-  'type': string = undefined;
-  @ApiProperty({ description: '成熟度' })
-  'maturity': string = undefined;
-  @ApiProperty({ description: '技术类型' })
-  'skill': string = undefined;
-  @ApiProperty({ description: '领域' })
-  'field': string = undefined;
-
-  @ApiProperty({ description: '合作类型' })
-  'cooperate': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-}
-
-export class QVO_project extends FVO_project {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_project {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '发布时间' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
-  @ApiProperty({ description: '行业分类' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '成熟度' })
-  @Rule(RuleType['string']().empty(''))
-  'maturity': string = undefined;
-  @ApiProperty({ description: '技术类型' })
-  @Rule(RuleType['string']().empty(''))
-  'skill': string = undefined;
-  @ApiProperty({ description: '领域' })
-  @Rule(RuleType['string']().empty(''))
-  'field': string = undefined;
-  @ApiProperty({ description: '成果地区' })
-  @Rule(RuleType['array']().empty(''))
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '合作类型' })
-  @Rule(RuleType['string']().empty(''))
-  'cooperate': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_project extends FVO_project {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_project extends CDTO_project {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_project extends FVO_project {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 114
src/interface/platform/sign.interface.ts

@@ -1,114 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_sign {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '赛事id' })
-  'match': string = undefined;
-  @ApiProperty({ description: '姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '电话号' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '证件类型' })
-  'cardType': string = undefined;
-  @ApiProperty({ description: '证件号码' })
-  'card': string = undefined;
-  @ApiProperty({ description: '微信/QQ' })
-  'communication': string = undefined;
-  @ApiProperty({ description: '电子邮箱' })
-  'email': string = undefined;
-  @ApiProperty({ description: '报名时间' })
-  'time': string = undefined;
-  @ApiProperty({ description: '备注' })
-  'remark': string = undefined;
-}
-
-export class QDTO_sign extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'match', 'time', 'name'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '赛事id' })
-  'match': string = undefined;
-  @ApiProperty({ description: '姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '报名时间' })
-  'time': string = undefined;
-}
-
-export class QVO_sign extends FVO_sign {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_sign {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '赛事id' })
-  @Rule(RuleType['string']().empty(''))
-  'match': string = undefined;
-  @ApiProperty({ description: '姓名' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '电话号' })
-  @Rule(RuleType['string']().empty(''))
-  'phone': string = undefined;
-  @ApiProperty({ description: '证件类型' })
-  @Rule(RuleType['string']().empty(''))
-  'cardType': string = undefined;
-  @ApiProperty({ description: '证件号码' })
-  @Rule(RuleType['string']().empty(''))
-  'card': string = undefined;
-  @ApiProperty({ description: '微信/QQ' })
-  @Rule(RuleType['string']().empty(''))
-  'communication': string = undefined;
-  @ApiProperty({ description: '电子邮箱' })
-  @Rule(RuleType['string']().empty(''))
-  'email': string = undefined;
-  @ApiProperty({ description: '报名时间' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
-  @ApiProperty({ description: '备注' })
-  @Rule(RuleType['string']().empty(''))
-  'remark': string = undefined;
-}
-
-export class CVO_sign extends FVO_sign {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_sign extends CDTO_sign {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_sign extends FVO_sign {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 139
src/interface/platform/supply.interface.ts

@@ -1,139 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_supply {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '需求紧急度' })
-  'urgent': string = undefined;
-  @ApiProperty({ description: '合作方式' })
-  'method': string = undefined;
-  @ApiProperty({ description: '有效期' })
-  'time': string = undefined;
-  @ApiProperty({ description: '价格' })
-  'money': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '需求状态' })
-  'demand_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-}
-
-export class QDTO_supply extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'name', 'type', 'field', 'method', 'area', 'demand_status', 'status', 'is_use'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '合作方式' })
-  'method': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '需求状态' })
-  'demand_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_use': string = undefined;
-}
-
-export class QVO_supply extends FVO_supply {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_supply {
-  @ApiProperty({ description: '用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '行业领域' })
-  @Rule(RuleType['string']().empty(''))
-  'field': string = undefined;
-  @ApiProperty({ description: '需求紧急度' })
-  @Rule(RuleType['string']().empty(''))
-  'urgent': string = undefined;
-  @ApiProperty({ description: '合作方式' })
-  @Rule(RuleType['string']().empty(''))
-  'method': string = undefined;
-  @ApiProperty({ description: '有效期' })
-  @Rule(RuleType['string']().empty(''))
-  'time': string = undefined;
-  @ApiProperty({ description: '价格' })
-  @Rule(RuleType['string']().empty(''))
-  'money': string = undefined;
-  @ApiProperty({ description: '需求地区' })
-  @Rule(RuleType['array']().empty(''))
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '需求状态' })
-  @Rule(RuleType['string']().empty(''))
-  'demand_status': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-}
-
-export class CVO_supply extends FVO_supply {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_supply extends CDTO_supply {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_supply extends FVO_supply {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 102
src/interface/platform/tags.interface.ts

@@ -1,102 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_tags {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '标题' })
-  'title': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '路由' })
-  'href': string = undefined;
-  @ApiProperty({ description: '排序' })
-  'sort': number = undefined;
-  @ApiProperty({ description: '英文标题' })
-  'English': string = undefined;
-  @ApiProperty({ description: '子菜单' })
-  'children': Array<any> = undefined;
-  @ApiProperty({ description: '备注' })
-  'remark': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  'is_use': string = undefined;
-}
-
-export class QDTO_tags extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['title', 'type', 'is_use'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '标题' })
-  'title': string = undefined;
-  @ApiProperty({ description: '类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  'is_use': string = undefined;
-}
-
-export class QVO_tags extends FVO_tags {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_tags {
-  @ApiProperty({ description: '标题' })
-  @Rule(RuleType['string']().empty(''))
-  'title': string = undefined;
-  @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '路由' })
-  @Rule(RuleType['string']().empty(''))
-  'href': string = undefined;
-  @ApiProperty({ description: '英文标题' })
-  @Rule(RuleType['string']().empty(''))
-  'English': string = undefined;
-  @ApiProperty({ description: '排序' })
-  @Rule(RuleType['number']().empty(''))
-  'sort': number = undefined;
-  @ApiProperty({ description: '子菜单' })
-  @Rule(RuleType['array']().empty(''))
-  'children': Array<any> = undefined;
-  @ApiProperty({ description: '备注' })
-  @Rule(RuleType['string']().empty(''))
-  'remark': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-}
-
-export class CVO_tags extends FVO_tags {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_tags extends CDTO_tags {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_tags extends FVO_tags {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 106
src/interface/users/association.interface.ts

@@ -1,106 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_association {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人' })
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_association extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'name', 'person_phone', 'is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_association extends FVO_association {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_association {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人' })
-  @Rule(RuleType['string']().empty(''))
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  @Rule(RuleType['string']().empty(''))
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_association extends FVO_association {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_association extends CDTO_association {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_association extends FVO_association {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 171
src/interface/users/company.interface.ts

@@ -1,171 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_company {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '企业名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: 'logo' })
-  'logo': Array<any> = undefined;
-  @ApiProperty({ description: '统一信用代码' })
-  'code': string = undefined;
-  @ApiProperty({ description: '企业类型' })
-  'pattern': string = undefined;
-  @ApiProperty({ description: '企业规模' })
-  'scale': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '所属行业' })
-  'type': string = undefined;
-  @ApiProperty({ description: '所在地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '法定代表人' })
-  'representative': string = undefined;
-  @ApiProperty({ description: '电子邮箱' })
-  'email': string = undefined;
-  @ApiProperty({ description: '员工人数' })
-  'person': number = undefined;
-  @ApiProperty({ description: '注册资本' })
-  'register': string = undefined;
-  @ApiProperty({ description: '成立日期' })
-  'create_time': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '公司状态' })
-  'companyStatus': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_company extends SearchBase {
-  constructor() {
-    const like_prop = ['name'];
-    const props = ['user', 'name', 'tags', 'phone', 'type', 'person', 'create_time', 'companyStatus','is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '企业名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '企业标签' })
-  'tags': Array<any> = undefined;
-  @ApiProperty({ description: '联系电话' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '所属行业' })
-  'type': string = undefined;
-  @ApiProperty({ description: '员工人数' })
-  'person': number = undefined;
-  @ApiProperty({ description: '成立日期' })
-  'create_time': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '公司状态' })
-  'companyStatus': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_company extends FVO_company {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_company {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '企业名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: 'logo' })
-  @Rule(RuleType['array']().empty(''))
-  'logo': Array<any> = undefined;
-  @ApiProperty({ description: '统一信用代码' })
-  @Rule(RuleType['string']().empty(''))
-  'code': string = undefined;
-  @ApiProperty({ description: '企业类型' })
-  @Rule(RuleType['string']().empty(''))
-  'pattern': string = undefined;
-  @ApiProperty({ description: '企业规模' })
-  @Rule(RuleType['string']().empty(''))
-  'scale': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  @Rule(RuleType['string']().empty(''))
-  'phone': string = undefined;
-  @ApiProperty({ description: '所属行业' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '所在地区' })
-  @Rule(RuleType['array']().empty(''))
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '法定代表人' })
-  @Rule(RuleType['string']().empty(''))
-  'representative': string = undefined;
-  @ApiProperty({ description: '电子邮箱' })
-  @Rule(RuleType['string']().empty(''))
-  'email': string = undefined;
-  @ApiProperty({ description: '员工人数' })
-  @Rule(RuleType['number']().empty(''))
-  'person': number = undefined;
-  @ApiProperty({ description: '注册资本' })
-  @Rule(RuleType['string']().empty(''))
-  'register': string = undefined;
-  @ApiProperty({ description: '成立日期' })
-  @Rule(RuleType['string']().empty(''))
-  'create_time': string = undefined;
-  @ApiProperty({ description: '地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '公司状态' })
-  @Rule(RuleType['string']().empty(''))
-  'companyStatus': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_company extends FVO_company {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_company extends CDTO_company {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_company extends FVO_company {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 108
src/interface/users/competition.interface.ts

@@ -1,108 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_competition {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人名称' })
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_competition extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'name', 'person', 'person_phone', 'is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人名称' })
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_competition extends FVO_competition {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_competition {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人名称' })
-  @Rule(RuleType['string']().empty(''))
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  @Rule(RuleType['string']().empty(''))
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_competition extends FVO_competition {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_competition extends CDTO_competition {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_competition extends FVO_competition {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

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

@@ -1,163 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_expert {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '专家姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '头像' })
-  'icon': Array<any> = undefined;
-  @ApiProperty({ description: '性别' })
-  'gender': string = undefined;
-  @ApiProperty({ description: '出生年月' })
-  'birth': string = undefined;
-  @ApiProperty({ description: '证件类型' })
-  'cardType': string = undefined;
-  @ApiProperty({ description: '证件号码' })
-  'card': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '所属领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '研究方向' })
-  'direction': string = undefined;
-  @ApiProperty({ description: '学历' })
-  'education': string = undefined;
-  @ApiProperty({ description: '工作单位' })
-  'work': string = undefined;
-  @ApiProperty({ description: '职称' })
-  'title': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '所在地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_expert extends SearchBase {
-  constructor() {
-    const like_prop = ['name'];
-    const props = ['user', 'name', 'gender', 'phone', 'field', 'direction', 'education', 'title', 'area', 'is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '专家姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '性别' })
-  'gender': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '所属领域' })
-  'field': string = undefined;
-  @ApiProperty({ description: '研究方向' })
-  'direction': string = undefined;
-  @ApiProperty({ description: '学历' })
-  'education': string = undefined;
-  @ApiProperty({ description: '职称' })
-  'title': string = undefined;
-  @ApiProperty({ description: '所在地区' })
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_expert extends FVO_expert {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_expert {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '专家姓名' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '头像' })
-  @Rule(RuleType['array']().empty(''))
-  'icon': Array<any> = undefined;
-  @ApiProperty({ description: '性别' })
-  @Rule(RuleType['string']().empty(''))
-  'gender': string = undefined;
-  @ApiProperty({ description: '出生年月' })
-  @Rule(RuleType['string']().empty(''))
-  'birth': string = undefined;
-  @ApiProperty({ description: '证件类型' })
-  @Rule(RuleType['string']().empty(''))
-  'cardType': string = undefined;
-  @ApiProperty({ description: '证件号码' })
-  @Rule(RuleType['string']().empty(''))
-  'card': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  @Rule(RuleType['string']().empty(''))
-  'phone': string = undefined;
-  @ApiProperty({ description: '所属领域' })
-  @Rule(RuleType['string']().empty(''))
-  'field': string = undefined;
-  @ApiProperty({ description: '研究方向' })
-  @Rule(RuleType['string']().empty(''))
-  'direction': string = undefined;
-  @ApiProperty({ description: '学历' })
-  @Rule(RuleType['string']().empty(''))
-  'education': string = undefined;
-  @ApiProperty({ description: '工作单位' })
-  @Rule(RuleType['string']().empty(''))
-  'work': string = undefined;
-  @ApiProperty({ description: '职称' })
-  @Rule(RuleType['string']().empty(''))
-  'title': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '所在地区' })
-  @Rule(RuleType['array']().empty(''))
-  'area': Array<any> = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_expert extends FVO_expert {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_expert extends CDTO_expert {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_expert extends FVO_expert {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 106
src/interface/users/incubator.interface.ts

@@ -1,106 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_incubator {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人姓名' })
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_incubator extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'name', 'person_phone', 'is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_incubator extends FVO_incubator {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_incubator {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人姓名' })
-  @Rule(RuleType['string']().empty(''))
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  @Rule(RuleType['string']().empty(''))
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_incubator extends FVO_incubator {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_incubator extends CDTO_incubator {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_incubator extends FVO_incubator {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 123
src/interface/users/investment.interface.ts

@@ -1,123 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_investment {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '投资人姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '投资人证件类型' })
-  'cardType': string = undefined;
-  @ApiProperty({ description: '投资人证件号码' })
-  'card': string = undefined;
-  @ApiProperty({ description: ' 投资人出资额' })
-  'money': string = undefined;
-  @ApiProperty({ description: '投资人出资方式' })
-  'type': string = undefined;
-  @ApiProperty({ description: '投资人的住所地' })
-  'address': string = undefined;
-  @ApiProperty({ description: '投资人的联系方式' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_investment extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'name', 'type', 'brief', 'is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '投资人姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '投资人出资方式' })
-  'type': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_investment extends FVO_investment {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_investment {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '投资人姓名' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '投资人证件类型' })
-  @Rule(RuleType['string']().empty(''))
-  'cardType': string = undefined;
-  @ApiProperty({ description: '投资人证件号码' })
-  @Rule(RuleType['string']().empty(''))
-  'card': string = undefined;
-  @ApiProperty({ description: ' 投资人出资额' })
-  @Rule(RuleType['string']().empty(''))
-  'money': string = undefined;
-  @ApiProperty({ description: '投资人出资方式' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '投资人的住所地' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '投资人的联系方式' })
-  @Rule(RuleType['string']().empty(''))
-  'phone': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_investment extends FVO_investment {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_investment extends CDTO_investment {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_investment extends FVO_investment {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 113
src/interface/users/state.interface.ts

@@ -1,113 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_state {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人' })
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '部门类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QDTO_state extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'name', 'type', 'address', 'is_show', 'status'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '部门类型' })
-  'type': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-}
-
-export class QVO_state extends FVO_state {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_state {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人' })
-  @Rule(RuleType['string']().empty(''))
-  'person': string = undefined;
-  @ApiProperty({ description: '负责人电话' })
-  @Rule(RuleType['string']().empty(''))
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '部门类型' })
-  @Rule(RuleType['string']().empty(''))
-  'type': string = undefined;
-  @ApiProperty({ description: '地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-}
-
-export class CVO_state extends FVO_state {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_state extends CDTO_state {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_state extends FVO_state {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 106
src/interface/users/unit.interface.ts

@@ -1,106 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { SearchBase } from 'free-midway-component';
-import get = require('lodash/get');
-const dealVO = (cla, data) => {
-  for (const key in cla) {
-    const val = get(data, key);
-    if (val || val === 0) cla[key] = val;
-  }
-};
-export class FVO_unit {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '科研机构名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '联系人' })
-  'person': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-}
-
-export class QDTO_unit extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['user', 'person', 'person_phone', 'status', 'is_show'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '平台用户id' })
-  'user': string = undefined;
-  @ApiProperty({ description: '联系人' })
-  'person': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  'is_show': string = undefined;
-}
-
-export class QVO_unit extends FVO_unit {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_unit {
-  @ApiProperty({ description: '平台用户id' })
-  @Rule(RuleType['string']().empty(''))
-  'user': string = undefined;
-  @ApiProperty({ description: '科研机构名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '联系人' })
-  @Rule(RuleType['string']().empty(''))
-  'person': string = undefined;
-  @ApiProperty({ description: '联系电话' })
-  @Rule(RuleType['string']().empty(''))
-  'person_phone': string = undefined;
-  @ApiProperty({ description: '地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-  @ApiProperty({ description: '是否公开' })
-  @Rule(RuleType['string']().empty(''))
-  'is_show': string = undefined;
-}
-
-export class CVO_unit extends FVO_unit {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_unit extends CDTO_unit {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_unit extends FVO_unit {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 109
src/queue/esSync.queue.ts

@@ -1,109 +0,0 @@
-import { Processor, IProcessor } from '@midwayjs/bull';
-import { DataRecordService } from '../service/record/dataRecord.service';
-import { Inject } from '@midwayjs/decorator';
-import { difference, differenceBy, get, intersection, isObject } from 'lodash';
-import { ElasticsearchService } from '../service/elasticsearch';
-import { FORMAT } from '@midwayjs/core';
-@Processor('esSync', {
-  // repeat: {
-  //   cron: FORMAT.CRONTAB.EVERY_MINUTE,
-  // },
-})
-export class EsSyncProcessor implements IProcessor {
-  @Inject()
-  dataRecord: DataRecordService;
-  @Inject()
-  es: ElasticsearchService;
-  async execute() {
-    return false;
-    // ...
-    console.log('in es sync processor');
-    const result = await this.dataRecord.noDealQuery({ es_sync: false });
-    for (const i of result) {
-      const origin_data = this.hasContext(get(i, 'origin_data'));
-      const new_data = this.hasContext(get(i, 'new_data'));
-      // 什么也没有直接下一个
-      if (!origin_data && !new_data) continue;
-      if (origin_data && !new_data) {
-        // 有旧数据,但是没有新数据: 所有的旧数据都是要删除的数据
-        const keys = Object.keys(origin_data);
-        await this.allDeleteData(i, keys);
-      } else if (!origin_data && new_data) {
-        // 有新数据但是没有旧数据: 所有的新数据都是添加的
-        const keys = Object.keys(new_data);
-        await this.allCreateData(i, keys);
-      } else {
-        // 新旧数据都存在,那就需要拿出来一个一个对比:
-        // 新旧数据都有的:修改
-        // 有新数据,没有旧数据: 创建
-        // 有旧数据,但是没有新数据: 删除
-        const odkeys = Object.keys(origin_data);
-        const ndkeys = Object.keys(new_data);
-        // 比较下表有没有区别
-        // d1: 以原数据为基础,新数据缺少的表.全都删除
-        const d1 = difference(odkeys, ndkeys);
-        // d2: 以新数据为基础,原数据缺少的表.全都创建
-        const d2 = difference(ndkeys, odkeys);
-        // d3: 两组数据共有的表,都是修改
-        const d3 = intersection(odkeys, ndkeys);
-        if (d1.length > 0) {
-          // 全部删除
-          await this.allDeleteData(i, d1);
-        }
-        if (d2.length > 0) {
-          // 全创建
-          await this.allCreateData(i, d2);
-        }
-        if (d3.length > 0) {
-          // 需要两组数据对比着进行数据甄别
-          await this.updateData(i, d3);
-        }
-      }
-      await this.dataRecord.updateOne(i._id, { es_sync: true });
-    }
-  }
-
-  async updateData(searchResult, tables) {
-    const ods = get(searchResult, 'origin_data');
-    const nds = get(searchResult, 'new_data');
-    for (const key of tables) {
-      // 因为走upsert,所以只需要知道那些是删除就行
-      const odList = ods[key];
-      // ndList: upsert的数据
-      const ndList = nds[key];
-      // 以原数据组为基础,不在新数据组中的数据:删除
-      const deleteList = differenceBy(odList, ndList, '_id');
-      // 批量删除
-      if (deleteList.length > 0) await this.es.deleteBat(key, deleteList);
-      // 批量修改
-      if (ndList.length > 0) await this.es.createAndUpdateBat(key, ndList);
-    }
-  }
-
-  async allDeleteData(searchResult, tables) {
-    const ds = get(searchResult, 'origin_data');
-    for (const key of tables) {
-      const datas = ds[key];
-      if (datas.length <= 0) continue;
-      // 批量删除
-      await this.es.deleteBat(key, datas);
-    }
-  }
-
-  async allCreateData(searchResult, tables) {
-    const ds = get(searchResult, 'new_data');
-    for (const key of tables) {
-      const datas = ds[key];
-      if (datas.length <= 0) continue;
-      // 批量创建
-      await this.es.createAndUpdateBat(key, datas);
-    }
-  }
-
-  hasContext(obj) {
-    if (!obj) return false;
-    if (!isObject(obj)) return false;
-    if (Object.keys(obj).length <= 0) return false;
-    return obj;
-  }
-}

+ 0 - 65
src/service/platform/achievement.service.ts

@@ -1,65 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Achievement } from '../../entity/platform/achievement.entity';
-import { Collection } from '../../entity/platform/collection.entity';
-import { User } from '../../entity/system/user.entity';
-import { get } from 'lodash';
-type modelType = ReturnModelType<typeof Achievement>;
-@Provide()
-export class AchievementService extends BaseService<modelType> {
-  @InjectEntityModel(Achievement)
-  model: modelType;
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-  @InjectEntityModel(User)
-  uModel: ReturnModelType<typeof User>;
-  // 成果列表
-  async list(query) {
-    const { skip = 0, limit = 0, is_use, status, ...condition } = query;
-    const { one, two, thr, four, five, six } = condition;
-    const info: any = { is_use, status };
-    if (one) info.technology = { $in: one };
-    if (two) info.field = { $in: two };
-    if (thr) info.mature = { $in: thr };
-    if (four) info.sell = { $in: four };
-    if (five) {
-      if (five === '1') info.money = '面议';
-      if (five === '2') info.money = { $gte: '1', $lte: '10' };
-      if (five === '3') info.money = { $gte: '10', $lte: '20' };
-      if (five === '4') info.money = { $gte: '20', $lte: '100' };
-      if (five === '5') info.money = { $gte: '100', $lte: '500' };
-      if (five === '6') info.money = { $gte: '500', $lte: '1000' };
-      if (five === '7') info.money = { $gte: '1000' };
-    }
-    if (six) info.area = { $in: six };
-    const data = await this.model.find(info).skip(skip).limit(limit).lean();
-    for (const val of data) {
-      if (get(val, 'user')) {
-        // 查询成果发布者
-        const userData = await this.uModel.findById(val.user).lean();
-        if (userData) Object.assign(val, { userName: userData.nick_name });
-      }
-    }
-    const total = await this.model.count(info);
-    return { data, total };
-  }
-  // 成果详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { userInfo: {}, is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, 'user')) {
-      // 查询成果发布者
-      const userData = await this.uModel.findById(arr.user).lean();
-      if (userData) data.userInfo = { name: userData.nick_name || '', phone: userData.phone || '' };
-    }
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该成果
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 98
src/service/platform/chat.service.ts

@@ -1,98 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { App } from '@midwayjs/core';
-import { Application } from '@midwayjs/ws';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Chat } from '../../entity/platform/chat.entity';
-import { get } from 'lodash';
-import { User } from '../../entity/system/user.entity';
-type modelType = ReturnModelType<typeof Chat>;
-@Provide()
-export class ChatService extends BaseService<modelType> {
-  @InjectEntityModel(Chat)
-  model: modelType;
-
-  @App('webSocket')
-  wsApp: Application;
-
-  @InjectEntityModel(User)
-  uModel: ReturnModelType<typeof User>;
-
-  // 实时发送消息
-  async createAfter(body) {
-    const sender = await this.uModel.findById(body.sender_id).lean();
-    const receiver = await this.uModel.findById(body.receiver_id).lean();
-    const data = { sender_url: get(sender, 'icon'), sender_name: get(sender, 'nick_name'), receiver_url: get(receiver, 'icon'), receiver_name: get(receiver, 'nick_name'), ...body };
-    this.wsApp.clients.forEach(ws => {
-      ws.send(JSON.stringify(data));
-    });
-  }
-
-  // 聊天
-  async chat(filter) {
-    const user = this.ctx.user;
-    const list = await this.model.aggregate([
-      { $match: { ...filter, $or: [{ sender_id: get(user, '_id') }, { receiver_id: get(user, '_id') }] } },
-      { $sort: { send_time: -1 } },
-      { $group: { _id: { sender_id: '$sender_id', receiver_id: '$receiver_id' }, other: { $first: '$$ROOT' } } },
-      { $replaceRoot: { newRoot: '$other' } },
-    ]);
-    const data = [];
-    for (const val of list) {
-      if (val.sender_id !== get(user, '_id')) {
-        const userData = await this.uModel.findById(val.sender_id).lean();
-        data.push({
-          _id: get(userData, '_id'),
-          nick_name: get(userData, 'nick_name'),
-          icon: get(userData, 'icon'),
-          send_time: val.send_time,
-          content: val.content,
-          type: val.type,
-          is_read: val.is_read,
-        });
-      }
-    }
-    return data;
-  }
-  // 聊天记录
-  async query(filter) {
-    const userInfo = this.ctx.user;
-    const { skip = 0, limit = 0, user, ...condition } = filter;
-    const list = await this.model
-      .find({
-        ...condition,
-        ...{ $or: [{ $and: [{ sender_id: user }, { receiver_id: get(userInfo, '_id') }] }, { $and: [{ sender_id: get(userInfo, '_id') }, { receiver_id: user }] }] },
-      })
-      .skip(skip)
-      .limit(limit)
-      .sort({ send_time: 1 })
-      .lean();
-    const data = [];
-    for (const val of list) {
-      const sender = await this.uModel.findById(val.sender_id).lean();
-      const receiver = await this.uModel.findById(val.receiver_id).lean();
-      data.push({
-        sender_url: get(sender, 'icon'),
-        sender_name: get(sender, 'nick_name'),
-        receiver_url: get(receiver, 'icon'),
-        receiver_name: get(receiver, 'nick_name'),
-        ...val,
-      });
-    }
-    return data;
-  }
-
-  // 该用户全部已读
-  async read(filter) {
-    const { sender_id, receiver_id } = filter;
-    const list: any = await this.model.find({ $or: [{ $and: [{ sender_id }, { receiver_id }] }, { $and: [{ sender_id: receiver_id }, { receiver_id: sender_id }] }] }).lean();
-    const chat = list.map(i => {
-      return i._id;
-    });
-    for (const val of chat) {
-      await this.model.updateOne({ _id: val }, { is_read: '1' });
-    }
-    return 'ok';
-  }
-}

+ 0 - 16
src/service/platform/collection.service.ts

@@ -1,16 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Collection } from '../../entity/platform/collection.entity';
-type modelType = ReturnModelType<typeof Collection>;
-@Provide()
-export class CollectionService extends BaseService<modelType> {
-  @InjectEntityModel(Collection)
-  model: modelType;
-  // 取消收藏
-  async cancel(data) {
-    const { user, source } = data;
-    await this.model.deleteOne({ user, source });
-  }
-}

+ 0 - 55
src/service/platform/demand.service.ts

@@ -1,55 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Demand } from '../../entity/platform/demand.entity';
-import { Collection } from '../../entity/platform/collection.entity';
-import { User } from '../../entity/system/user.entity';
-import { get } from 'lodash';
-type modelType = ReturnModelType<typeof Demand>;
-@Provide()
-export class DemandService extends BaseService<modelType> {
-  @InjectEntityModel(Demand)
-  model: modelType;
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-  @InjectEntityModel(User)
-  uModel: ReturnModelType<typeof User>;
-  // 需求列表
-  async list(query) {
-    const { skip = 0, limit = 0, is_use, status, ...condition } = query;
-    const { one, two, thr, four } = condition;
-    const info: any = { is_use, status };
-    if (one) info.field = { $in: one };
-    if (two) info.method = { $in: two };
-    if (thr) info.area = { $in: thr };
-    if (four) info.demand_status = { $in: four };
-    const data = await this.model.find(info).skip(skip).limit(limit).lean();
-    for (const val of data) {
-      if (get(val, 'user')) {
-        // 查询需求发布者
-        const userData = await this.uModel.findById(val.user).lean();
-        if (userData) Object.assign(val, { userName: userData.nick_name });
-      }
-    }
-    const total = await this.model.count(info);
-    return { data, total };
-  }
-  // 需求详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { userInfo: {}, is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, 'user')) {
-      // 查询需求发布者
-      const userData = await this.uModel.findById(arr.user).lean();
-      if (userData) data.userInfo = { name: userData.nick_name || '', phone: userData.phone || '' };
-    }
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该需求
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 11
src/service/platform/design.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Design } from '../../entity/platform/design.entity';
-type modelType = ReturnModelType<typeof Design>;
-@Provide()
-export class DesignService extends BaseService<modelType> {
-  @InjectEntityModel(Design)
-  model: modelType;
-}

+ 0 - 29
src/service/platform/match.service.ts

@@ -1,29 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Match } from '../../entity/platform/match.entity';
-import { get } from 'lodash';
-import { Collection } from '../../entity/platform/collection.entity';
-type modelType = ReturnModelType<typeof Match>;
-@Provide()
-export class MatchService extends BaseService<modelType> {
-  @InjectEntityModel(Match)
-  model: modelType;
-
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-
-  // 比赛详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { userInfo: {}, is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该比赛
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 16
src/service/platform/news.service.ts

@@ -1,16 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { News } from '../../entity/platform/news.entity';
-type modelType = ReturnModelType<typeof News>;
-@Provide()
-export class NewsService extends BaseService<modelType> {
-  @InjectEntityModel(News)
-  model: modelType;
-  // 加浏览量
-  async fetchBrowse(data) {
-    const { number, _id } = data;
-    await this.model.updateOne({ _id }, { number: number + 1 });
-  }
-}

+ 0 - 55
src/service/platform/project.service.ts

@@ -1,55 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Project } from '../../entity/platform/project.entity';
-import { Collection } from '../../entity/platform/collection.entity';
-import { User } from '../../entity/system/user.entity';
-import { get } from 'lodash';
-type modelType = ReturnModelType<typeof Project>;
-@Provide()
-export class ProjectService extends BaseService<modelType> {
-  @InjectEntityModel(Project)
-  model: modelType;
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-  @InjectEntityModel(User)
-  uModel: ReturnModelType<typeof User>;
-  // 项目列表
-  async list(query) {
-    const { skip = 0, limit = 0, is_use, status, ...condition } = query;
-    const { one, two, thr, four } = condition;
-    const info: any = { is_use, status };
-    if (one) info.field = { $in: one };
-    if (two) info.cooperate = { $in: two };
-    if (thr) info.area = { $in: thr };
-    if (four) info.maturity = { $in: four };
-    const data = await this.model.find(info).skip(skip).limit(limit).lean();
-    for (const val of data) {
-      if (get(val, 'user')) {
-        // 查询项目发布者
-        const userData = await this.uModel.findById(val.user).lean();
-        if (userData) Object.assign(val, { userName: userData.nick_name });
-      }
-    }
-    const total = await this.model.count(info);
-    return { data, total };
-  }
-  //项目详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { userInfo: {}, is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, 'user')) {
-      // 查询项目发布者
-      const userData = await this.uModel.findById(arr.user).lean();
-      if (userData) data.userInfo = { name: userData.nick_name || '', phone: userData.phone || '' };
-    }
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该项目
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 56
src/service/platform/sign.service.ts

@@ -1,56 +0,0 @@
-import { Provide, Inject } from '@midwayjs/decorator';
-import { ServiceError } from 'free-midway-component';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Sign } from '../../entity/platform/sign.entity';
-import { Match } from '../../entity/platform/match.entity';
-import { get } from 'lodash';
-import { I18nService } from '../i18n.service';
-import { FrameErrorEnum } from '../../error/frame.error';
-type modelType = ReturnModelType<typeof Sign>;
-@Provide()
-export class SignService extends BaseService<modelType> {
-  @InjectEntityModel(Sign)
-  model: modelType;
-
-  @InjectEntityModel(Match)
-  mModel: ReturnModelType<typeof Match>;
-
-  @Inject()
-  i18n: I18nService;
-
-  // 报名检查
-  async createExamine(data) {
-    const { user, match } = data;
-    const result = await this.model.findOne({ user, match }).lean();
-    if (result) throw new ServiceError(this.i18n.translateError(FrameErrorEnum.SERVICE_REPEAT), FrameErrorEnum.SERVICE_REPEAT);
-  }
-
-  // 列表
-  async sign(query) {
-    const { skip = 0, limit = 0, ...condition } = query;
-    const list = await this.model.find(condition).skip(skip).limit(limit).lean();
-    const data = [];
-    for (const val of list) {
-      if (get(val, 'match')) {
-        // 查询需求发布者
-        const matchInfo = await this.mModel.findById(val.match).lean();
-        if (matchInfo) {
-          data.push({
-            _id: get(val, '_id'),
-            match: get(val, 'match'),
-            money: get(matchInfo, 'money'),
-            match_name: get(matchInfo, 'name'),
-            match_time: get(matchInfo, 'time'),
-            organization: get(matchInfo, 'organization'),
-            time: get(val, 'time'),
-            status: get(matchInfo, 'match_status'),
-          });
-        }
-      }
-    }
-    const total = await this.model.count(condition);
-    return { data, total };
-  }
-}

+ 0 - 55
src/service/platform/supply.service.ts

@@ -1,55 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Supply } from '../../entity/platform/supply.entity';
-import { Collection } from '../../entity/platform/collection.entity';
-import { User } from '../../entity/system/user.entity';
-import { get } from 'lodash';
-type modelType = ReturnModelType<typeof Supply>;
-@Provide()
-export class SupplyService extends BaseService<modelType> {
-  @InjectEntityModel(Supply)
-  model: modelType;
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-  @InjectEntityModel(User)
-  uModel: ReturnModelType<typeof User>;
-  // 需求列表
-  async list(query) {
-    const { skip = 0, limit = 0, is_use, status, ...condition } = query;
-    const { one, two, thr, four } = condition;
-    const info: any = { is_use, status };
-    if (one) info.field = { $in: one };
-    if (two) info.method = { $in: two };
-    if (thr) info.area = { $in: thr };
-    if (four) info.demand_status = { $in: four };
-    const data = await this.model.find(info).skip(skip).limit(limit).lean();
-    for (const val of data) {
-      if (get(val, 'user')) {
-        // 查询需求发布者
-        const userData = await this.uModel.findById(val.user).lean();
-        if (userData) Object.assign(val, { userName: userData.nick_name });
-      }
-    }
-    const total = await this.model.count(info);
-    return { data, total };
-  }
-  // 需求详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { userInfo: {}, is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, 'user')) {
-      // 查询需求发布者
-      const userData = await this.uModel.findById(arr.user).lean();
-      if (userData) data.userInfo = { name: userData.nick_name || '', phone: userData.phone || '' };
-    }
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该需求
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 11
src/service/platform/tags.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Tags } from '../../entity/platform/tags.entity';
-type modelType = ReturnModelType<typeof Tags>;
-@Provide()
-export class TagsService extends BaseService<modelType> {
-  @InjectEntityModel(Tags)
-  model: modelType;
-}

+ 0 - 130
src/service/tool.service.ts

@@ -1,137 +1,7 @@
 import { Inject, Provide } from '@midwayjs/core';
 import { Context } from '@midwayjs/koa';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { Collection } from '../entity/platform/collection.entity';
-import { Achievement } from '../entity/platform/achievement.entity';
-import { Demand } from '../entity/platform/demand.entity';
-import { Match } from '../entity/platform/match.entity';
-import { Expert } from '../entity/users/expert.entity';
-import { Company } from '../entity/users/company.entity';
-import { Project } from '../entity/platform/project.entity';
-import { News } from '../entity/platform/news.entity';
-import { Unit } from '../entity/users/unit.entity';
 @Provide()
 export class ToolService {
   @Inject()
   ctx: Context;
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-
-  @InjectEntityModel(Achievement)
-  aModel: ReturnModelType<typeof Achievement>;
-
-  @InjectEntityModel(Demand)
-  dModel: ReturnModelType<typeof Demand>;
-
-  @InjectEntityModel(Project)
-  pModel: ReturnModelType<typeof Project>;
-
-  @InjectEntityModel(Match)
-  mModel: ReturnModelType<typeof Match>;
-
-  @InjectEntityModel(News)
-  nModel: ReturnModelType<typeof News>;
-
-  @InjectEntityModel(Unit)
-  uModel: ReturnModelType<typeof Unit>;
-
-  @InjectEntityModel(Expert)
-  eModel: ReturnModelType<typeof Expert>;
-
-  @InjectEntityModel(Company)
-  companyModel: ReturnModelType<typeof Company>;
-
-  // 搜索总数
-  async getTotal(filter) {
-    const { searchValue, ...condition } = filter;
-    const actList = [
-      { label: '成果', value: 'achievement' },
-      { label: '需求', value: 'demand' },
-      { label: '项目', value: 'project' },
-      { label: '赛事', value: 'match' },
-      { label: '资讯', value: 'news' },
-      { label: '单位', value: 'unit' },
-      { label: '企业', value: 'company' },
-      { label: '专家', value: 'expert' },
-    ];
-    for (const val of actList) {
-      let model;
-      const query = { ...condition };
-      if (searchValue) {
-        if (val.value === 'news') query.title = { $regex: searchValue };
-        else query.name = { $regex: searchValue };
-      }
-      if (val.value === 'achievement') model = this.aModel;
-      if (val.value === 'demand') model = this.dModel;
-      if (val.value === 'project') model = this.pModel;
-      if (val.value === 'match') model = this.mModel;
-      if (val.value === 'news') model = this.nModel;
-      if (val.value === 'unit') model = this.uModel;
-      if (val.value === 'company') model = this.companyModel;
-      if (val.value === 'expert') model = this.eModel;
-      const total = await model.count(query).lean();
-      val.label = val.label + `(${total})`;
-    }
-    return actList;
-  }
-
-  // 搜索
-  async query(filter) {
-    const { skip = 0, limit = 0, type, searchValue, ...condition } = filter;
-    let model;
-    const query = { ...condition };
-    if (searchValue) {
-      if (type === 'news') query.title = { $regex: searchValue };
-      else query.name = { $regex: searchValue };
-    }
-    if (type === 'achievement') model = this.aModel;
-    if (type === 'demand') model = this.dModel;
-    if (type === 'project') model = this.pModel;
-    if (type === 'match') model = this.mModel;
-    if (type === 'news') model = this.nModel;
-    if (type === 'unit') model = this.uModel;
-    if (type === 'company') model = this.companyModel;
-    if (type === 'expert') model = this.eModel;
-    const data = await model.find(query).skip(skip).limit(limit).lean();
-    const total = await model.count(query).lean();
-    return { data, total };
-  }
-
-  // 收藏总数
-  async getCollectionTotal() {
-    const user = this.ctx.user;
-    const actList = [
-      { label: '成果', value: 'achievement' },
-      { label: '需求', value: 'demand' },
-      { label: '项目', value: 'project' },
-      { label: '赛事', value: 'match' },
-      { label: '企业', value: 'company' },
-      { label: '专家', value: 'expert' },
-    ];
-    for (const val of actList) {
-      const total = await this.cModel.count({ user, type: val.value }).lean();
-      val.label = val.label + `(${total})`;
-    }
-    return actList;
-  }
-  // 我的收藏
-  async getCollection(filter) {
-    const user = this.ctx.user;
-    const { skip = 0, limit = 0, type } = filter;
-    let model;
-    const data = [];
-    if (type === 'achievement') model = this.aModel;
-    if (type === 'demand') model = this.dModel;
-    if (type === 'project') model = this.pModel;
-    if (type === 'match') model = this.mModel;
-    if (type === 'company') model = this.companyModel;
-    if (type === 'expert') model = this.eModel;
-    const list = await this.cModel.find({ user, type }).skip(skip).limit(limit).lean();
-    for (const val of list) {
-      data.push(await model.findById(val.source).lean());
-    }
-    const total = await this.cModel.count({ user, type }).lean();
-    return { data, total };
-  }
 }

+ 0 - 11
src/service/users/association.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Association } from '../../entity/users/association.entity';
-type modelType = ReturnModelType<typeof Association>;
-@Provide()
-export class AssociationService extends BaseService<modelType> {
-  @InjectEntityModel(Association)
-  model: modelType;
-}

+ 0 - 44
src/service/users/company.service.ts

@@ -1,44 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Company } from '../../entity/users/company.entity';
-import { Collection } from '../../entity/platform/collection.entity';
-import { get } from 'lodash';
-type modelType = ReturnModelType<typeof Company>;
-@Provide()
-export class CompanyService extends BaseService<modelType> {
-  @InjectEntityModel(Company)
-  model: modelType;
-
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-
-  // 企业列表
-  async list(query) {
-    const { skip = 0, limit = 0, is_show, status, ...condition } = query;
-    const { one, two, thr, four, five } = condition;
-    const info: any = { is_show, status };
-    if (one) info.scale = { $in: one };
-    if (two) info.pattern = { $in: two };
-    if (thr) info.area = { $in: thr };
-    if (four) info.type = { $in: four };
-    if (five) info.companyStatus = { $in: five };
-    const data = await this.model.find(info).skip(skip).limit(limit).lean();
-    const total = await this.model.count(info);
-    return { data, total };
-  }
-
-  // 企业详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该企业
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 11
src/service/users/competition.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Competition } from '../../entity/users/competition.entity';
-type modelType = ReturnModelType<typeof Competition>;
-@Provide()
-export class CompetitionService extends BaseService<modelType> {
-  @InjectEntityModel(Competition)
-  model: modelType;
-}

+ 0 - 42
src/service/users/expert.service.ts

@@ -1,42 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Expert } from '../../entity/users/expert.entity';
-import { Collection } from '../../entity/platform/collection.entity';
-import { get } from 'lodash';
-type modelType = ReturnModelType<typeof Expert>;
-@Provide()
-export class ExpertService extends BaseService<modelType> {
-  @InjectEntityModel(Expert)
-  model: modelType;
-  @InjectEntityModel(Collection)
-  cModel: ReturnModelType<typeof Collection>;
-
-  // 专家列表
-  async list(query) {
-    const { skip = 0, limit = 0, is_show, status, ...condition } = query;
-    const { one, two, thr, four } = condition;
-    const info: any = { is_show, status };
-    if (one) info.field = { $in: one };
-    if (two) info.title = { $in: two };
-    if (thr) info.area = { $in: thr };
-    if (four) info.area = { $in: four };
-    const data = await this.model.find(info).skip(skip).limit(limit).lean();
-    const total = await this.model.count(info);
-    return { data, total };
-  }
-
-  // 专家详情
-  async detail(id) {
-    const user = this.ctx.user;
-    const data = { is_collection: false };
-    const arr = await this.model.findById(id).lean();
-    if (arr && get(arr, '_id')) {
-      // 查询是否收藏该专家
-      const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
-      if (collection) data.is_collection = true;
-    }
-    return { ...arr, ...data };
-  }
-}

+ 0 - 11
src/service/users/incubator.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Incubator } from '../../entity/users/incubator.entity';
-type modelType = ReturnModelType<typeof Incubator>;
-@Provide()
-export class IncubatorService extends BaseService<modelType> {
-  @InjectEntityModel(Incubator)
-  model: modelType;
-}

+ 0 - 11
src/service/users/investment.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Investment } from '../../entity/users/investment.entity';
-type modelType = ReturnModelType<typeof Investment>;
-@Provide()
-export class InvestmentService extends BaseService<modelType> {
-  @InjectEntityModel(Investment)
-  model: modelType;
-}

+ 0 - 11
src/service/users/state.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { State } from '../../entity/users/state.entity';
-type modelType = ReturnModelType<typeof State>;
-@Provide()
-export class StateService extends BaseService<modelType> {
-  @InjectEntityModel(State)
-  model: modelType;
-}

+ 0 - 11
src/service/users/unit.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Unit } from '../../entity/users/unit.entity';
-type modelType = ReturnModelType<typeof Unit>;
-@Provide()
-export class UnitService extends BaseService<modelType> {
-  @InjectEntityModel(Unit)
-  model: modelType;
-}

+ 0 - 19
src/socket/socket.controller.ts

@@ -1,19 +0,0 @@
-import { WSController, OnWSConnection, OnWSMessage, Inject } from '@midwayjs/core';
-import { Context } from '@midwayjs/ws';
-import * as http from 'http';
-
-@WSController()
-export class SocketController {
-  @Inject()
-  ctx: Context;
-
-  @OnWSConnection()
-  async onConnectionMethod(socket: Context, request: http.IncomingMessage) {
-    console.log(`namespace / got a connection ${this.ctx.readyState}`);
-  }
-
-  @OnWSMessage('message')
-  async gotMessage(data) {
-    return { name: '检测心跳', result: data };
-  }
-}