zs před 1 rokem
rodič
revize
4f6f4fc20f
37 změnil soubory, kde provedl 799 přidání a 955 odebrání
  1. 3 3
      src/config/config.prod.ts
  2. 24 25
      src/controller/others/news.controller.ts
  3. 24 25
      src/controller/dining/rate.controller.ts
  4. 24 25
      src/controller/dining/menu.controller.ts
  5. 67 0
      src/controller/core/personnel.controller.ts
  6. 0 76
      src/controller/dining/arrange.controller.ts
  7. 0 92
      src/controller/dining/order.controller.ts
  8. 14 15
      src/controller/system/user.controller.ts
  9. 33 0
      src/entity/core/apply.entity.ts
  10. 19 0
      src/entity/core/business.entity.ts
  11. 15 0
      src/entity/core/path.entity.ts
  12. 27 0
      src/entity/core/personnel.entity.ts
  13. 0 13
      src/entity/dining/arrange.entity.ts
  14. 0 23
      src/entity/dining/menu.entity.ts
  15. 0 34
      src/entity/dining/order.entity.ts
  16. 0 15
      src/entity/dining/rate.entity.ts
  17. 0 21
      src/entity/others/news.entity.ts
  18. 14 6
      src/entity/system/config.entity.ts
  19. 7 3
      src/entity/system/user.entity.ts
  20. 135 0
      src/interface/core/apply.interface.ts
  21. 96 0
      src/interface/core/business.interface.ts
  22. 88 0
      src/interface/core/path.interface.ts
  23. 118 0
      src/interface/core/personnel.interface.ts
  24. 0 71
      src/interface/dining/arrange.interface.ts
  25. 0 98
      src/interface/dining/menu.interface.ts
  26. 0 86
      src/interface/dining/order.interface.ts
  27. 0 78
      src/interface/dining/rate.interface.ts
  28. 0 93
      src/interface/others/news.interface.ts
  29. 36 16
      src/interface/system/config.interface.ts
  30. 29 13
      src/interface/system/user.interface.ts
  31. 5 5
      src/service/dining/menu.service.ts
  32. 5 5
      src/service/others/news.service.ts
  33. 5 5
      src/service/dining/rate.service.ts
  34. 5 5
      src/service/dining/arrange.service.ts
  35. 0 98
      src/service/dining/order.service.ts
  36. 5 5
      src/service/init.service.ts
  37. 1 1
      src/service/system/user.service.ts

+ 3 - 3
src/config/config.prod.ts

@@ -1,12 +1,12 @@
 import { MidwayConfig } from '@midwayjs/core';
 const ip = '127.0.0.1';
-const project = 'st-midway';
+const project = 'notarization';
 export default {
   // use for cookie sign key, should change to your own and keep security
   keys: '1697684406848_4978',
   koa: {
-    port: 9901,
-    globalPrefix: '/st/api',
+    port: 9990,
+    globalPrefix: '/notarization/api',
   },
   swagger: {
     swaggerPath: '/doc/api',

+ 24 - 25
src/controller/others/news.controller.ts

@@ -1,55 +1,51 @@
 import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
 import { BaseController } from 'free-midway-component';
-import { NewsService } from '../../service/others/news.service';
-import { CDTO_news, CVO_news, FVO_news, QDTO_news, QVO_news, UDTO_news, UVAO_news } from '../../interface/others/news.interface';
+import { ApplyService } from '../../service/core/apply.service';
+import { CDTO_apply, CVO_apply, FVO_apply,QDTO_apply, QVO_apply, UDTO_apply, UVAO_apply } from '../../interface/core/apply.interface';
 import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
 import { Validate } from '@midwayjs/validate';
-@ApiTags(['新闻表'])
-@Controller('/news')
-export class NewsController extends BaseController {
+@ApiTags(['申请记录'])
+@Controller('/apply')
+export class ApplyController extends BaseController {
   @Inject()
-  service: NewsService;
+  service: ApplyService;
 
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_news })
-  async create(@Body() data: CDTO_news) {
+
+@Post('/') @Validate() @ApiResponse({ type: CVO_apply })
+  async create(@Body() data: CDTO_apply) {
     const dbData = await this.service.create(data);
-    const result = new CVO_news(dbData);
+    const result = new CVO_apply(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) {
+@Get('/')@ApiQuery({name:'query'})@ApiResponse({ type: QVO_apply })
+  async query(@Query() filter:QDTO_apply, @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);
+      const newData = new QVO_apply(i);
       data.push(newData);
     }
     const total = await this.service.count(filter);
     return { data, total };
   }
 
-  @Get('/:id')
-  @ApiResponse({ type: FVO_news })
+
+@Get('/:id')@ApiResponse({ type: FVO_apply })
   async fetch(@Param('id') id: string) {
     const data = await this.service.fetch(id);
-    const result = new FVO_news(data);
+    const result = new FVO_apply(data);
     return result;
   }
 
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_news })
-  async update(@Param('id') id: string, @Body() body: UDTO_news) {
+
+@Post('/:id')@Validate()@ApiResponse({ type: UVAO_apply })
+  async update(@Param('id') id: string, @Body() body: UDTO_apply) {
     const result = await this.service.updateOne(id, body);
     return result;
   }
 
-  @Del('/:id')
-  @Validate()
+
+@Del('/:id')@Validate()
   async delete(@Param('id') id: string) {
     await this.service.delete(id);
     return 'ok';
@@ -58,11 +54,14 @@ export class NewsController extends BaseController {
     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.');
   }
 }
+

+ 24 - 25
src/controller/dining/rate.controller.ts

@@ -1,55 +1,51 @@
 import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
 import { BaseController } from 'free-midway-component';
-import { RateService } from '../../service/dining/rate.service';
-import { CDTO_rate, CVO_rate, FVO_rate, QDTO_rate, QVO_rate, UDTO_rate, UVAO_rate } from '../../interface/dining/rate.interface';
+import { BusinessService } from '../../service/core/business.service';
+import { CDTO_business, CVO_business, FVO_business,QDTO_business, QVO_business, UDTO_business, UVAO_business } from '../../interface/core/business.interface';
 import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
 import { Validate } from '@midwayjs/validate';
-@ApiTags(['菜品评价'])
-@Controller('/rate')
-export class RateController extends BaseController {
+@ApiTags(['业务'])
+@Controller('/business')
+export class BusinessController extends BaseController {
   @Inject()
-  service: RateService;
+  service: BusinessService;
 
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_rate })
-  async create(@Body() data: CDTO_rate) {
+
+@Post('/') @Validate() @ApiResponse({ type: CVO_business })
+  async create(@Body() data: CDTO_business) {
     const dbData = await this.service.create(data);
-    const result = new CVO_rate(dbData);
+    const result = new CVO_business(dbData);
     return result;
   }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_rate })
-  async query(@Query() filter: QDTO_rate, @Query('skip') skip: number, @Query('limit') limit: number) {
+@Get('/')@ApiQuery({name:'query'})@ApiResponse({ type: QVO_business })
+  async query(@Query() filter:QDTO_business, @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_rate(i);
+      const newData = new QVO_business(i);
       data.push(newData);
     }
     const total = await this.service.count(filter);
     return { data, total };
   }
 
-  @Get('/:id')
-  @ApiResponse({ type: FVO_rate })
+
+@Get('/:id')@ApiResponse({ type: FVO_business })
   async fetch(@Param('id') id: string) {
     const data = await this.service.fetch(id);
-    const result = new FVO_rate(data);
+    const result = new FVO_business(data);
     return result;
   }
 
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_rate })
-  async update(@Param('id') id: string, @Body() body: UDTO_rate) {
+
+@Post('/:id')@Validate()@ApiResponse({ type: UVAO_business })
+  async update(@Param('id') id: string, @Body() body: UDTO_business) {
     const result = await this.service.updateOne(id, body);
     return result;
   }
 
-  @Del('/:id')
-  @Validate()
+
+@Del('/:id')@Validate()
   async delete(@Param('id') id: string) {
     await this.service.delete(id);
     return 'ok';
@@ -58,11 +54,14 @@ export class RateController extends BaseController {
     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.');
   }
 }
+

+ 24 - 25
src/controller/dining/menu.controller.ts

@@ -1,55 +1,51 @@
 import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
 import { BaseController } from 'free-midway-component';
-import { MenuService } from '../../service/dining/menu.service';
-import { CDTO_menu, CVO_menu, FVO_menu, QDTO_menu, QVO_menu, UDTO_menu, UVAO_menu } from '../../interface/dining/menu.interface';
+import { PathService } from '../../service/core/path.service';
+import { CDTO_path, CVO_path, FVO_path,QDTO_path, QVO_path, UDTO_path, UVAO_path } from '../../interface/core/path.interface';
 import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
 import { Validate } from '@midwayjs/validate';
-@ApiTags(['菜品'])
-@Controller('/menu')
-export class MenuController extends BaseController {
+@ApiTags(['申办流程'])
+@Controller('/path')
+export class PathController extends BaseController {
   @Inject()
-  service: MenuService;
+  service: PathService;
 
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_menu })
-  async create(@Body() data: CDTO_menu) {
+
+@Post('/') @Validate() @ApiResponse({ type: CVO_path })
+  async create(@Body() data: CDTO_path) {
     const dbData = await this.service.create(data);
-    const result = new CVO_menu(dbData);
+    const result = new CVO_path(dbData);
     return result;
   }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_menu })
-  async query(@Query() filter: QDTO_menu, @Query('skip') skip: number, @Query('limit') limit: number) {
+@Get('/')@ApiQuery({name:'query'})@ApiResponse({ type: QVO_path })
+  async query(@Query() filter:QDTO_path, @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_menu(i);
+      const newData = new QVO_path(i);
       data.push(newData);
     }
     const total = await this.service.count(filter);
     return { data, total };
   }
 
-  @Get('/:id')
-  @ApiResponse({ type: FVO_menu })
+
+@Get('/:id')@ApiResponse({ type: FVO_path })
   async fetch(@Param('id') id: string) {
     const data = await this.service.fetch(id);
-    const result = new FVO_menu(data);
+    const result = new FVO_path(data);
     return result;
   }
 
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_menu })
-  async update(@Param('id') id: string, @Body() body: UDTO_menu) {
+
+@Post('/:id')@Validate()@ApiResponse({ type: UVAO_path })
+  async update(@Param('id') id: string, @Body() body: UDTO_path) {
     const result = await this.service.updateOne(id, body);
     return result;
   }
 
-  @Del('/:id')
-  @Validate()
+
+@Del('/:id')@Validate()
   async delete(@Param('id') id: string) {
     await this.service.delete(id);
     return 'ok';
@@ -58,11 +54,14 @@ export class MenuController extends BaseController {
     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.');
   }
 }
+

+ 67 - 0
src/controller/core/personnel.controller.ts

@@ -0,0 +1,67 @@
+import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { PersonnelService } from '../../service/core/personnel.service';
+import { CDTO_personnel, CVO_personnel, FVO_personnel,QDTO_personnel, QVO_personnel, UDTO_personnel, UVAO_personnel } from '../../interface/core/personnel.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['公证员'])
+@Controller('/personnel')
+export class PersonnelController extends BaseController {
+  @Inject()
+  service: PersonnelService;
+
+
+@Post('/') @Validate() @ApiResponse({ type: CVO_personnel })
+  async create(@Body() data: CDTO_personnel) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_personnel(dbData);
+    return result;
+  }
+@Get('/')@ApiQuery({name:'query'})@ApiResponse({ type: QVO_personnel })
+  async query(@Query() filter:QDTO_personnel, @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_personnel(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+
+@Get('/:id')@ApiResponse({ type: FVO_personnel })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_personnel(data);
+    return result;
+  }
+
+
+@Post('/:id')@Validate()@ApiResponse({ type: UVAO_personnel })
+  async update(@Param('id') id: string, @Body() body: UDTO_personnel) {
+    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/dining/arrange.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 { ArrangeService } from '../../service/dining/arrange.service';
-import { CDTO_arrange, CVO_arrange, FVO_arrange, QDTO_arrange, QVO_arrange, UDTO_arrange, UVAO_arrange } from '../../interface/dining/arrange.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['日程安排'])
-@Controller('/arrange')
-export class ArrangeController extends BaseController {
-  @Inject()
-  service: ArrangeService;
-
-  @Get('/getByDate')
-  @ApiResponse({})
-  async getByDate(@Query('date') date: string) {
-    const data = await this.service.findOne({ date });
-    const result = new FVO_arrange(data);
-    return result;
-  }
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_arrange })
-  async create(@Body() data: CDTO_arrange) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_arrange(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_arrange })
-  async query(@Query() filter: QDTO_arrange, @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_arrange(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_arrange })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_arrange(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_arrange })
-  async update(@Param('id') id: string, @Body() body: UDTO_arrange) {
-    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 - 92
src/controller/dining/order.controller.ts

@@ -1,92 +0,0 @@
-import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { OrderService } from '../../service/dining/order.service';
-import { CDTO_order, CVO_order, FVO_order, QDTO_order, QVO_order, UDTO_order, UVAO_order } from '../../interface/dining/order.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['订单'])
-@Controller('/order')
-export class OrderController extends BaseController {
-  @Inject()
-  service: OrderService;
-
-  @Get('/useMeal/:id')
-  async useMeal(@Param('id') id: string) {
-    await this.service.useMeal(id)
-  }
-
-  @Post('/mealCard/:openid')
-  async mealCard(@Param('openid') openid: string) {
-    const data = await this.service.mealCard(openid);
-    return data;
-  }
-
-  @Get('/getByOpenid')
-  async getByOpenid(@Query('openid') openid: string, @Query('date') date: string) {
-    const data = await this.service.findOne({ openid, date });
-    const result = new FVO_order(data);
-    return result;
-  }
-
-  @Get('/getMeal/:id')
-  async getMeal(@Param('id') id: string) {
-    const data = await this.service.getMeal(id);
-    return data;
-  }
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_order })
-  async create(@Body() data: CDTO_order) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_order(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_order })
-  async query(@Query() filter: QDTO_order, @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_order(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_order })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_order(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_order })
-  async update(@Param('id') id: string, @Body() body: UDTO_order) {
-    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.');
-  }
-}

+ 14 - 15
src/controller/system/user.controller.ts

@@ -1,7 +1,7 @@
 import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';
 import { BaseController } from 'free-midway-component';
 import { UserService } from '../../service/system/user.service';
-import { CDTO_user, CVO_user, FVO_user, QDTO_user, QVO_user, UDTO_user, UVAO_user } from '../../interface/system/user.interface';
+import { CDTO_user, CVO_user, FVO_user,QDTO_user, QVO_user, UDTO_user, UVAO_user } from '../../interface/system/user.interface';
 import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
 import { Validate } from '@midwayjs/validate';
 @ApiTags(['用户表'])
@@ -10,18 +10,15 @@ export class UserController extends BaseController {
   @Inject()
   service: UserService;
 
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_user })
+
+@Post('/') @Validate() @ApiResponse({ type: CVO_user })
   async create(@Body() data: CDTO_user) {
     const dbData = await this.service.create(data);
     const result = new CVO_user(dbData);
     return result;
   }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_user })
-  async query(@Query() filter: QDTO_user, @Query('skip') skip: number, @Query('limit') limit: number) {
+@Get('/')@ApiQuery({name:'query'})@ApiResponse({ type: QVO_user })
+  async query(@Query() filter:QDTO_user, @Query('skip') skip: number,@Query('limit') limit: number){
     const list = await this.service.query(filter, { skip, limit });
     const data = [];
     for (const i of list) {
@@ -32,24 +29,23 @@ export class UserController extends BaseController {
     return { data, total };
   }
 
-  @Get('/:id')
-  @ApiResponse({ type: FVO_user })
+
+@Get('/:id')@ApiResponse({ type: FVO_user })
   async fetch(@Param('id') id: string) {
     const data = await this.service.fetch(id);
     const result = new FVO_user(data);
     return result;
   }
 
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_user })
+
+@Post('/:id')@Validate()@ApiResponse({ type: UVAO_user })
   async update(@Param('id') id: string, @Body() body: UDTO_user) {
     const result = await this.service.updateOne(id, body);
     return result;
   }
 
-  @Del('/:id')
-  @Validate()
+
+@Del('/:id')@Validate()
   async delete(@Param('id') id: string) {
     await this.service.delete(id);
     return 'ok';
@@ -58,11 +54,14 @@ export class UserController extends BaseController {
     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.');
   }
 }
+

+ 33 - 0
src/entity/core/apply.entity.ts

@@ -0,0 +1,33 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'apply' },
+})
+export class Apply extends BaseModel {
+  @prop({ required: false, index: true, zh: '用户' })
+  user: string;
+  @prop({ required: false, index: true, zh: '公证员' })
+  admin: string;
+  @prop({ required: false, index: true, zh: '业务' })
+  business: string;
+  @prop({ required: false, index: false, zh: '材料' })
+  material: object;
+  @prop({ required: false, index: true, zh: '类型' })
+  type: string;
+  @prop({ required: false, index: false, zh: '地址' })
+  address: string;
+  @prop({ required: false, index: false, zh: '签字' })
+  sign: Array<any>;
+  @prop({ required: false, index: false, zh: '人脸识别' })
+  face: Array<any>;
+  @prop({ required: false, index: false, zh: '支付信息' })
+  pay: object;
+  @prop({ required: false, index: false, zh: '证书' })
+  certificate: Array<any>;
+  @prop({ required: false, index: false, zh: '意见' })
+  opinion: string;
+  @prop({ required: false, index: false, zh: '时间' })
+  time: string;
+  @prop({ required: false, index: false, zh: '状态' })
+  status: string;
+}

+ 19 - 0
src/entity/core/business.entity.ts

@@ -0,0 +1,19 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'business' },
+})
+export class Business extends BaseModel {
+  @prop({ required: false, index: true, zh: '名称' })
+  name: string;
+  @prop({ required: false, index: false, zh: '内容' })
+  content: string;
+  @prop({ required: false, index: false, zh: '收费标准' })
+  money: string;
+  @prop({ required: false, index: false, zh: '收费依据' })
+  basic: string;
+  @prop({ required: false, index: false, zh: '所需材料' })
+  material: object;
+  @prop({ required: false, index: true, zh: '是否使用', default: '0' })
+  is_use: string;
+}

+ 15 - 0
src/entity/core/path.entity.ts

@@ -0,0 +1,15 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'path' },
+})
+export class Path extends BaseModel {
+  @prop({ required: false, index: true, zh: '名称' })
+  name: string;
+  @prop({ required: false, index: false, zh: '图标' })
+  icon: Array<any>;
+  @prop({ required: false, index: true, zh: '排序' })
+  sort: string;
+  @prop({ required: false, index: true, zh: '是否使用', default: '0' })
+  is_use: string;
+}

+ 27 - 0
src/entity/core/personnel.entity.ts

@@ -0,0 +1,27 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'personnel' },
+})
+export class Personnel extends BaseModel {
+  @prop({ required: false, index: false, zh: '头像' })
+  logo: Array<any>;
+  @prop({ required: false, index: true, zh: '姓名' })
+  name: string;
+  @prop({ required: false, index: true, zh: '性别' })
+  gender: string;
+  @prop({ required: false, index: false, zh: '出生年月' })
+  birth: string;
+  @prop({ required: false, index: false, zh: '学历' })
+  education: string;
+  @prop({ required: false, index: false, zh: '专业' })
+  speciality: string;
+  @prop({ required: false, index: false, zh: '执业证号' })
+  number: string;
+  @prop({ required: false, index: false, zh: '工作经历' })
+  work: object;
+  @prop({ required: false, index: false, zh: '简介' })
+  brief: string;
+  @prop({ required: false, index: true, zh: '是否使用', default: '0' })
+  is_use: string;
+}

+ 0 - 13
src/entity/dining/arrange.entity.ts

@@ -1,13 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'arrange' },
-})
-export class Arrange extends BaseModel {
-  @prop({ required: false, index: false, zh: '日期' })
-  date: string;
-  @prop({ required: false, index: false, zh: '安排', remark: 'key为:breakfast,lunch,dinner.再将菜品以数组的形式最为value' })
-  arrange: object;
-  @prop({ required: false, index: false, zh: '备注' })
-  remark: string;
-}

+ 0 - 23
src/entity/dining/menu.entity.ts

@@ -1,23 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'menu' },
-})
-export class Menu extends BaseModel {
-  @prop({ required: false, index: true, zh: '名称' })
-  name: string;
-  @prop({ required: false, index: false, zh: '参数列表' })
-  params: Array<any>;
-  @prop({ required: false, index: false, zh: '已点数量', remark: '需要在订单结束后,累加', default: '0' })
-  order: number;
-  @prop({ required: false, index: false, zh: '图片' })
-  img: Array<any>;
-  @prop({ required: false, index: false, zh: '介绍' })
-  content: string;
-  @prop({ required: false, index: false, zh: '卡路里', remark: '单位:大卡' })
-  reserve: number;
-  @prop({ required: false, index: false, zh: '是否使用', default: '0' })
-  is_use: string;
-  @prop({ required: false, index: false, zh: '备注' })
-  remark: string;
-}

+ 0 - 34
src/entity/dining/order.entity.ts

@@ -1,34 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-import { Types } from 'mongoose';
-const ObjectId = Types.ObjectId;
-// 处理三餐数据: 没有is_use就填上; 没有_id就填上
-const mealDeal = (val: object) => {
-  const obj: any = {};
-  if (!('is_use' in val)) {
-    obj.is_use = false;
-  }
-  if (!('_id' in val)) {
-    obj._id = new ObjectId().toString();
-  }
-  const newObj = { ...obj, ...val };
-  return newObj;
-};
-
-@modelOptions({
-  schemaOptions: { collection: 'order' },
-})
-export class Order extends BaseModel {
-  @prop({ required: false, index: false, zh: '微信用户' })
-  openid: string;
-  @prop({ required: false, index: false, zh: '日期' })
-  date: string;
-  @prop({ required: false, index: false, zh: '早餐', set: mealDeal })
-  breakfast: object;
-  @prop({ required: false, index: false, zh: '午餐', set: mealDeal })
-  lunch: object;
-  @prop({ required: false, index: false, zh: '晚餐', set: mealDeal })
-  dinner: object;
-  @prop({ required: false, index: false, zh: '备注' })
-  remark: string;
-}

+ 0 - 15
src/entity/dining/rate.entity.ts

@@ -1,15 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'rate' },
-})
-export class Rate extends BaseModel {
-  @prop({ required: true, index: true, zh: '菜品id', ref: '' })
-  menu_id: string;
-  @prop({ required: true, index: false, zh: '用户id' })
-  openid: string;
-  @prop({ required: false, index: false, zh: '评价分数', remark: '1-5分', default: '5' })
-  score: number;
-  @prop({ required: false, index: false, zh: '评价内容' })
-  content: string;
-}

+ 0 - 21
src/entity/others/news.entity.ts

@@ -1,21 +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: false, zh: '来源' })
-  origin: string;
-  @prop({ required: false, index: false, zh: '创建时间' })
-  create_time: string;
-  @prop({ required: false, index: false, zh: '内容' })
-  content: string;
-  @prop({ required: false, index: false, zh: '封面图片', remark: '1张' })
-  img: Array<any>;
-  @prop({ required: false, index: false, zh: '简介' })
-  brief: string;
-  @prop({ required: false, index: false, zh: '是否使用', default: '0' })
-  is_use: string;
-}

+ 14 - 6
src/entity/system/config.entity.ts

@@ -6,10 +6,18 @@ import { BaseModel } from 'free-midway-component';
 export class Config extends BaseModel {
   @prop({ required: false, index: false, zh: 'logo' })
   logo: Array<any>;
-  @prop({ required: false, index: false, zh: '早餐时间', remark: '' })
-  b_time: Array<any>;
-  @prop({ required: false, index: false, zh: '午餐时间' })
-  l_time: Array<any>;
-  @prop({ required: false, index: false, zh: '晚餐时间' })
-  d_time: Array<any>;
+  @prop({ required: false, index: false, zh: '联系电话' })
+  phone: string;
+  @prop({ required: false, index: false, zh: '邮箱' })
+  email: string;
+  @prop({ required: false, index: false, zh: '地址' })
+  address: string;
+  @prop({ required: false, index: false, zh: '工作时间' })
+  time: string;
+  @prop({ required: false, index: false, zh: '平台简介' })
+  brief: string;
+  @prop({ required: false, index: false, zh: '办证须知' })
+  notice: string;
+  @prop({ required: false, index: false, zh: '用户协议', remark: '' })
+  agreement: string;
 }

+ 7 - 3
src/entity/system/user.entity.ts

@@ -8,8 +8,12 @@ export class User extends BaseModel {
   openid: string;
   @prop({ required: false, index: false, zh: '昵称' })
   nick_name: string;
+  @prop({ required: false, index: false, zh: '身份证号' })
+  card: string;
   @prop({ required: false, index: false, zh: '电话' })
-  tel: string;
-  @prop({ required: false, index: false, zh: '部门' })
-  dept: string;
+  phone: string;
+  @prop({ required: false, index: false, zh: '身份证正面' })
+  file_one: Array<any>;
+  @prop({ required: false, index: false, zh: '身份证反面' })
+  file_two: Array<any>;
 }

+ 135 - 0
src/interface/core/apply.interface.ts

@@ -0,0 +1,135 @@
+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_apply {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '用户' })
+  'user': string = undefined;
+  @ApiProperty({ description: '公证员' })
+  'admin': string = undefined;
+  @ApiProperty({ description: '业务' })
+  'business': string = undefined;
+  @ApiProperty({ description: '材料' })
+  'material': object = undefined;
+  @ApiProperty({ description: '类型' })
+  'type': string = undefined;
+  @ApiProperty({ description: '地址' })
+  'address': string = undefined;
+  @ApiProperty({ description: '签字' })
+  'sign': Array<any> = undefined;
+  @ApiProperty({ description: '人脸识别' })
+  'face': Array<any> = undefined;
+  @ApiProperty({ description: '支付信息' })
+  'pay': object = undefined;
+  @ApiProperty({ description: '证书' })
+  'certificate': Array<any> = undefined;
+  @ApiProperty({ description: '意见' })
+  'opinion': string = undefined;
+  @ApiProperty({ description: '时间' })
+  'time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+}
+
+
+export class QDTO_apply extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = ['user', 'admin', 'business', 'type'];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '用户' })
+  'user': string = undefined;
+  @ApiProperty({ description: '公证员' })
+  'admin': string = undefined;
+  @ApiProperty({ description: '业务' })
+  'business': string = undefined;
+  @ApiProperty({ description: '类型' })
+  'type': string = undefined;
+}
+
+
+export class QVO_apply extends FVO_apply {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class CDTO_apply {
+  @ApiProperty({ description: '用户' })
+@Rule(RuleType['string']().empty(''))
+  'user': string = undefined;
+  @ApiProperty({ description: '公证员' })
+@Rule(RuleType['string']().empty(''))
+  'admin': string = undefined;
+  @ApiProperty({ description: '业务' })
+@Rule(RuleType['string']().empty(''))
+  'business': string = undefined;
+  @ApiProperty({ description: '材料' })
+@Rule(RuleType['object']().empty(''))
+  'material': object = undefined;
+  @ApiProperty({ description: '类型' })
+@Rule(RuleType['string']().empty(''))
+  'type': string = undefined;
+  @ApiProperty({ description: '地址' })
+@Rule(RuleType['string']().empty(''))
+  'address': string = undefined;
+  @ApiProperty({ description: '签字' })
+@Rule(RuleType['array']().empty(''))
+  'sign': Array<any> = undefined;
+  @ApiProperty({ description: '人脸识别' })
+@Rule(RuleType['array']().empty(''))
+  'face': Array<any> = undefined;
+  @ApiProperty({ description: '支付信息' })
+@Rule(RuleType['object']().empty(''))
+  'pay': object = undefined;
+  @ApiProperty({ description: '证书' })
+@Rule(RuleType['array']().empty(''))
+  'certificate': Array<any> = undefined;
+  @ApiProperty({ description: '意见' })
+@Rule(RuleType['string']().empty(''))
+  'opinion': string = undefined;
+  @ApiProperty({ description: '时间' })
+@Rule(RuleType['string']().empty(''))
+  'time': string = undefined;
+  @ApiProperty({ description: '状态' })
+@Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+}
+
+
+export class CVO_apply extends FVO_apply {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class UDTO_apply extends CDTO_apply {
+    @ApiProperty({ description: '数据id' })
+    @Rule(RuleType['string']().empty(''))
+    _id: string = undefined;
+}
+
+
+export class UVAO_apply extends FVO_apply {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 96 - 0
src/interface/core/business.interface.ts

@@ -0,0 +1,96 @@
+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_business {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '名称' })
+  'name': string = undefined;
+  @ApiProperty({ description: '内容' })
+  'content': string = undefined;
+  @ApiProperty({ description: '收费标准' })
+  'money': string = undefined;
+  @ApiProperty({ description: '收费依据' })
+  'basic': string = undefined;
+  @ApiProperty({ description: '所需材料' })
+  'material': object = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
+}
+
+
+export class QDTO_business extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = ['name', 'is_use'];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '名称' })
+  'name': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
+}
+
+
+export class QVO_business extends FVO_business {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class CDTO_business {
+  @ApiProperty({ description: '名称' })
+@Rule(RuleType['string']().empty(''))
+  'name': string = undefined;
+  @ApiProperty({ description: '内容' })
+@Rule(RuleType['string']().empty(''))
+  'content': string = undefined;
+  @ApiProperty({ description: '收费标准' })
+@Rule(RuleType['string']().empty(''))
+  'money': string = undefined;
+  @ApiProperty({ description: '收费依据' })
+@Rule(RuleType['string']().empty(''))
+  'basic': string = undefined;
+  @ApiProperty({ description: '所需材料' })
+@Rule(RuleType['object']().empty(''))
+  'material': object = undefined;
+  @ApiProperty({ description: '是否使用' })
+@Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+}
+
+
+export class CVO_business extends FVO_business {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class UDTO_business extends CDTO_business {
+    @ApiProperty({ description: '数据id' })
+    @Rule(RuleType['string']().empty(''))
+    _id: string = undefined;
+}
+
+
+export class UVAO_business extends FVO_business {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 88 - 0
src/interface/core/path.interface.ts

@@ -0,0 +1,88 @@
+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_path {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '名称' })
+  'name': string = undefined;
+  @ApiProperty({ description: '图标' })
+  'icon': Array<any> = undefined;
+  @ApiProperty({ description: '排序' })
+  'sort': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
+}
+
+
+export class QDTO_path extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = ['name', 'sort', 'is_use'];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '名称' })
+  'name': string = undefined;
+  @ApiProperty({ description: '排序' })
+  'sort': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
+}
+
+
+export class QVO_path extends FVO_path {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class CDTO_path {
+  @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(''))
+  'sort': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+@Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+}
+
+
+export class CVO_path extends FVO_path {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class UDTO_path extends CDTO_path {
+    @ApiProperty({ description: '数据id' })
+    @Rule(RuleType['string']().empty(''))
+    _id: string = undefined;
+}
+
+
+export class UVAO_path extends FVO_path {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 118 - 0
src/interface/core/personnel.interface.ts

@@ -0,0 +1,118 @@
+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_personnel {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '头像' })
+  'logo': Array<any> = undefined;
+  @ApiProperty({ description: '姓名' })
+  'name': string = undefined;
+  @ApiProperty({ description: '性别' })
+  'gender': string = undefined;
+  @ApiProperty({ description: '出生年月' })
+  'birth': string = undefined;
+  @ApiProperty({ description: '学历' })
+  'education': string = undefined;
+  @ApiProperty({ description: '专业' })
+  'speciality': string = undefined;
+  @ApiProperty({ description: '执业证号' })
+  'number': string = undefined;
+  @ApiProperty({ description: '工作经历' })
+  'work': object = undefined;
+  @ApiProperty({ description: '简介' })
+  'brief': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
+}
+
+
+export class QDTO_personnel extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = ['name', 'gender', 'is_use'];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '姓名' })
+  'name': string = undefined;
+  @ApiProperty({ description: '性别' })
+  'gender': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
+}
+
+
+export class QVO_personnel extends FVO_personnel {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class CDTO_personnel {
+  @ApiProperty({ description: '头像' })
+@Rule(RuleType['array']().empty(''))
+  'logo': Array<any> = undefined;
+  @ApiProperty({ description: '姓名' })
+@Rule(RuleType['string']().empty(''))
+  'name': string = 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(''))
+  'education': string = undefined;
+  @ApiProperty({ description: '专业' })
+@Rule(RuleType['string']().empty(''))
+  'speciality': string = undefined;
+  @ApiProperty({ description: '执业证号' })
+@Rule(RuleType['string']().empty(''))
+  'number': string = undefined;
+  @ApiProperty({ description: '工作经历' })
+@Rule(RuleType['object']().empty(''))
+  'work': object = undefined;
+  @ApiProperty({ description: '简介' })
+@Rule(RuleType['string']().empty(''))
+  'brief': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+@Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+}
+
+
+export class CVO_personnel extends FVO_personnel {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+
+export class UDTO_personnel extends CDTO_personnel {
+    @ApiProperty({ description: '数据id' })
+    @Rule(RuleType['string']().empty(''))
+    _id: string = undefined;
+}
+
+
+export class UVAO_personnel extends FVO_personnel {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 0 - 71
src/interface/dining/arrange.interface.ts

@@ -1,71 +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_arrange {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '日期' })
-  'date': string = undefined;
-  @ApiProperty({ description: '安排' })
-  'arrange': object = undefined;
-  @ApiProperty({ description: '备注' })
-  'remark': string = undefined;
-}
-
-export class QDTO_arrange extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = [];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-}
-
-export class QVO_arrange extends FVO_arrange {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_arrange {
-  @ApiProperty({ description: '日期' })
-  @Rule(RuleType['string']().empty(''))
-  'date': string = undefined;
-  @ApiProperty({ description: '安排' })
-  @Rule(RuleType['object']().empty(''))
-  'arrange': object = undefined;
-  @ApiProperty({ description: '备注' })
-  @Rule(RuleType['string']().empty(''))
-  'remark': string = undefined;
-}
-
-export class CVO_arrange extends FVO_arrange {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_arrange extends CDTO_arrange {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_arrange extends FVO_arrange {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 98
src/interface/dining/menu.interface.ts

@@ -1,98 +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_menu {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-  @ApiProperty({ description: '参数列表' })
-  'params': Array<any> = undefined;
-  @ApiProperty({ description: '已点数量' })
-  'order': number = undefined;
-  @ApiProperty({ description: '图片' })
-  'img': Array<any> = undefined;
-  @ApiProperty({ description: '介绍' })
-  'content': string = undefined;
-  @ApiProperty({ description: '卡路里' })
-  'reserve': number = undefined;
-  @ApiProperty({ description: '是否使用' })
-  'is_use': string = undefined;
-  @ApiProperty({ description: '备注' })
-  'remark': string = undefined;
-}
-
-export class QDTO_menu extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['name'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '名称' })
-  'name': string = undefined;
-}
-
-export class QVO_menu extends FVO_menu {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_menu {
-  @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '参数列表' })
-  @Rule(RuleType['array']().empty(''))
-  'params': Array<any> = undefined;
-  @ApiProperty({ description: '已点数量' })
-  @Rule(RuleType['number']().empty(''))
-  'order': number = undefined;
-  @ApiProperty({ description: '图片' })
-  @Rule(RuleType['array']().empty(''))
-  'img': Array<any> = undefined;
-  @ApiProperty({ description: '介绍' })
-  @Rule(RuleType['string']().empty(''))
-  'content': string = undefined;
-  @ApiProperty({ description: '卡路里' })
-  @Rule(RuleType['number']().empty(''))
-  'reserve': number = undefined;
-  @ApiProperty({ description: '是否使用' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': string = undefined;
-  @ApiProperty({ description: '备注' })
-  @Rule(RuleType['string']().empty(''))
-  'remark': string = undefined;
-}
-
-export class CVO_menu extends FVO_menu {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_menu extends CDTO_menu {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_menu extends FVO_menu {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 86
src/interface/dining/order.interface.ts

@@ -1,86 +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_order {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '微信用户' })
-  'openid': string = undefined;
-  @ApiProperty({ description: '日期' })
-  'date': string = undefined;
-  @ApiProperty({ description: '早餐' })
-  'breakfast': object = undefined;
-  @ApiProperty({ description: '午餐' })
-  'lunch': object = undefined;
-  @ApiProperty({ description: '晚餐' })
-  'dinner': object = undefined;
-  @ApiProperty({ description: '备注' })
-  'remark': string = undefined;
-}
-
-export class QDTO_order extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = [];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-}
-
-export class QVO_order extends FVO_order {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_order {
-  @ApiProperty({ description: '微信用户' })
-  @Rule(RuleType['string']().empty(''))
-  'openid': string = undefined;
-  @ApiProperty({ description: '日期' })
-  @Rule(RuleType['string']().empty(''))
-  'date': string = undefined;
-  @ApiProperty({ description: '早餐' })
-  @Rule(RuleType['object']().empty(''))
-  'breakfast': object = undefined;
-  @ApiProperty({ description: '午餐' })
-  @Rule(RuleType['object']().empty(''))
-  'lunch': object = undefined;
-  @ApiProperty({ description: '晚餐' })
-  @Rule(RuleType['object']().empty(''))
-  'dinner': object = undefined;
-  @ApiProperty({ description: '备注' })
-  @Rule(RuleType['string']().empty(''))
-  'remark': string = undefined;
-}
-
-export class CVO_order extends FVO_order {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_order extends CDTO_order {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_order extends FVO_order {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 78
src/interface/dining/rate.interface.ts

@@ -1,78 +0,0 @@
-import { Rule, RuleType } from '@midwayjs/validate';
-import { ApiProperty } from '@midwayjs/swagger';
-import { FrameworkErrorEnum, SearchBase, ServiceError } 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_rate {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '菜品id' })
-  'menu_id': string = undefined;
-  @ApiProperty({ description: '用户id' })
-  'openid': string = undefined;
-  @ApiProperty({ description: '评价分数' })
-  'score': number = undefined;
-  @ApiProperty({ description: '评价内容' })
-  'content': string = undefined;
-}
-
-export class QDTO_rate extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['menu_id'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '菜品id' })
-  'menu_id': string = undefined;
-}
-
-export class QVO_rate extends FVO_rate {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_rate {
-  @ApiProperty({ description: '菜品id' })
-  @Rule(RuleType['string']().required().error(new ServiceError('缺少菜品id', FrameworkErrorEnum.NEED_BODY)))
-  'menu_id': string = undefined;
-  @ApiProperty({ description: '用户id' })
-  @Rule(RuleType['string']().required().error(new ServiceError('缺少用户id', FrameworkErrorEnum.NEED_BODY)))
-  'openid': string = undefined;
-  @ApiProperty({ description: '评价分数' })
-  @Rule(RuleType['number']().empty(''))
-  'score': number = undefined;
-  @ApiProperty({ description: '评价内容' })
-  @Rule(RuleType['string']().empty(''))
-  'content': string = undefined;
-}
-
-export class CVO_rate extends FVO_rate {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_rate extends CDTO_rate {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_rate extends FVO_rate {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 93
src/interface/others/news.interface.ts

@@ -1,93 +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: '来源' })
-  'origin': string = undefined;
-  @ApiProperty({ description: '创建时间' })
-  'create_time': string = undefined;
-  @ApiProperty({ description: '内容' })
-  'content': string = undefined;
-  @ApiProperty({ description: '封面图片' })
-  'img': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  'is_use': string = undefined;
-}
-
-export class QDTO_news extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = ['title'];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '标题' })
-  'title': 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['string']().empty(''))
-  'origin': string = undefined;
-  @ApiProperty({ description: '创建时间' })
-  @Rule(RuleType['string']().empty(''))
-  'create_time': string = undefined;
-  @ApiProperty({ description: '内容' })
-  @Rule(RuleType['string']().empty(''))
-  'content': string = undefined;
-  @ApiProperty({ description: '封面图片' })
-  @Rule(RuleType['array']().empty(''))
-  'img': Array<any> = undefined;
-  @ApiProperty({ description: '简介' })
-  @Rule(RuleType['string']().empty(''))
-  'brief': string = undefined;
-  @ApiProperty({ description: '是否使用' })
-  @Rule(RuleType['string']().empty(''))
-  'is_use': 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);
-  }
-}

+ 36 - 16
src/interface/system/config.interface.ts

@@ -16,12 +16,20 @@ export class FVO_config {
   _id: string = undefined;
   @ApiProperty({ description: 'logo' })
   'logo': Array<any> = undefined;
-  @ApiProperty({ description: '早餐时间' })
-  'b_time': Array<any> = undefined;
-  @ApiProperty({ description: '午餐时间' })
-  'l_time': Array<any> = undefined;
-  @ApiProperty({ description: '晚餐时间' })
-  'd_time': Array<any> = undefined;
+  @ApiProperty({ description: '联系电话' })
+  'phone': string = undefined;
+  @ApiProperty({ description: '邮箱' })
+  'email': string = undefined;
+  @ApiProperty({ description: '地址' })
+  'address': string = undefined;
+  @ApiProperty({ description: '工作时间' })
+  'time': string = undefined;
+  @ApiProperty({ description: '平台简介' })
+  'brief': string = undefined;
+  @ApiProperty({ description: '办证须知' })
+  'notice': string = undefined;
+  @ApiProperty({ description: '用户协议' })
+  'agreement': string = undefined;
 }
 
 
@@ -47,15 +55,27 @@ export class CDTO_config {
   @ApiProperty({ description: 'logo' })
 @Rule(RuleType['array']().empty(''))
   'logo': Array<any> = undefined;
-  @ApiProperty({ description: '早餐时间' })
-@Rule(RuleType['array']().empty(''))
-  'b_time': Array<any> = undefined;
-  @ApiProperty({ description: '午餐时间' })
-@Rule(RuleType['array']().empty(''))
-  'l_time': Array<any> = undefined;
-  @ApiProperty({ description: '晚餐时间' })
-@Rule(RuleType['array']().empty(''))
-  'd_time': Array<any> = undefined;
+  @ApiProperty({ description: '联系电话' })
+@Rule(RuleType['string']().empty(''))
+  'phone': string = undefined;
+  @ApiProperty({ description: '邮箱' })
+@Rule(RuleType['string']().empty(''))
+  'email': string = undefined;
+  @ApiProperty({ description: '地址' })
+@Rule(RuleType['string']().empty(''))
+  'address': string = undefined;
+  @ApiProperty({ description: '工作时间' })
+@Rule(RuleType['string']().empty(''))
+  'time': string = undefined;
+  @ApiProperty({ description: '平台简介' })
+@Rule(RuleType['string']().empty(''))
+  'brief': string = undefined;
+  @ApiProperty({ description: '办证须知' })
+@Rule(RuleType['string']().empty(''))
+  'notice': string = undefined;
+  @ApiProperty({ description: '用户协议' })
+@Rule(RuleType['string']().empty(''))
+  'agreement': string = undefined;
 }
 
 
@@ -79,4 +99,4 @@ export class UVAO_config extends FVO_config {
     super(data);
     dealVO(this, data);
   }
-}
+}

+ 29 - 13
src/interface/system/user.interface.ts

@@ -18,12 +18,17 @@ export class FVO_user {
   'openid': string = undefined;
   @ApiProperty({ description: '昵称' })
   'nick_name': string = undefined;
+  @ApiProperty({ description: '身份证号' })
+  'card': string = undefined;
   @ApiProperty({ description: '电话' })
-  'tel': string = undefined;
-  @ApiProperty({ description: '部门' })
-  'dept': string = undefined;
+  'phone': string = undefined;
+  @ApiProperty({ description: '身份证正面' })
+  'file_one': Array<any> = undefined;
+  @ApiProperty({ description: '身份证反面' })
+  'file_two': Array<any> = undefined;
 }
 
+
 export class QDTO_user extends SearchBase {
   constructor() {
     const like_prop = [];
@@ -33,6 +38,7 @@ export class QDTO_user extends SearchBase {
   }
 }
 
+
 export class QVO_user extends FVO_user {
   constructor(data: object) {
     super(data);
@@ -40,21 +46,29 @@ export class QVO_user extends FVO_user {
   }
 }
 
+
 export class CDTO_user {
   @ApiProperty({ description: '微信小程序id' })
-  @Rule(RuleType['string']().empty(''))
+@Rule(RuleType['string']().empty(''))
   'openid': string = undefined;
   @ApiProperty({ description: '昵称' })
-  @Rule(RuleType['string']().empty(''))
+@Rule(RuleType['string']().empty(''))
   'nick_name': string = undefined;
+  @ApiProperty({ description: '身份证号' })
+@Rule(RuleType['string']().empty(''))
+  'card': string = undefined;
   @ApiProperty({ description: '电话' })
-  @Rule(RuleType['string']().empty(''))
-  'tel': string = undefined;
-  @ApiProperty({ description: '部门' })
-  @Rule(RuleType['string']().empty(''))
-  'dept': string = undefined;
+@Rule(RuleType['string']().empty(''))
+  'phone': string = undefined;
+  @ApiProperty({ description: '身份证正面' })
+@Rule(RuleType['array']().empty(''))
+  'file_one': Array<any> = undefined;
+  @ApiProperty({ description: '身份证反面' })
+@Rule(RuleType['array']().empty(''))
+  'file_two': Array<any> = undefined;
 }
 
+
 export class CVO_user extends FVO_user {
   constructor(data: object) {
     super(data);
@@ -62,12 +76,14 @@ export class CVO_user extends FVO_user {
   }
 }
 
+
 export class UDTO_user extends CDTO_user {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
+    @ApiProperty({ description: '数据id' })
+    @Rule(RuleType['string']().empty(''))
+    _id: string = undefined;
 }
 
+
 export class UVAO_user extends FVO_user {
   constructor(data: object) {
     super(data);

+ 5 - 5
src/service/dining/menu.service.ts

@@ -2,10 +2,10 @@ import { Provide } from '@midwayjs/decorator';
 import { InjectEntityModel } from '@midwayjs/typegoose';
 import { ReturnModelType } from '@typegoose/typegoose';
 import { BaseService } from 'free-midway-component';
-import { Menu } from '../../entity/dining/menu.entity';
-type modelType = ReturnModelType<typeof Menu>;
+import { Apply } from '../../entity/core/apply.entity';
+type modelType = ReturnModelType<typeof Apply>;
 @Provide()
-export class MenuService extends BaseService<modelType> {
-  @InjectEntityModel(Menu)
+export class ApplyService extends BaseService<modelType> {
+  @InjectEntityModel(Apply)
   model: modelType;
-}
+}

+ 5 - 5
src/service/others/news.service.ts

@@ -2,10 +2,10 @@ 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/others/news.entity';
-type modelType = ReturnModelType<typeof News>;
+import { Business } from '../../entity/core/business.entity';
+type modelType = ReturnModelType<typeof Business>;
 @Provide()
-export class NewsService extends BaseService<modelType> {
-  @InjectEntityModel(News)
+export class BusinessService extends BaseService<modelType> {
+  @InjectEntityModel(Business)
   model: modelType;
-}
+}

+ 5 - 5
src/service/dining/rate.service.ts

@@ -2,10 +2,10 @@ import { Provide } from '@midwayjs/decorator';
 import { InjectEntityModel } from '@midwayjs/typegoose';
 import { ReturnModelType } from '@typegoose/typegoose';
 import { BaseService } from 'free-midway-component';
-import { Rate } from '../../entity/dining/rate.entity';
-type modelType = ReturnModelType<typeof Rate>;
+import { Path } from '../../entity/core/path.entity';
+type modelType = ReturnModelType<typeof Path>;
 @Provide()
-export class RateService extends BaseService<modelType> {
-  @InjectEntityModel(Rate)
+export class PathService extends BaseService<modelType> {
+  @InjectEntityModel(Path)
   model: modelType;
-}
+}

+ 5 - 5
src/service/dining/arrange.service.ts

@@ -2,10 +2,10 @@ import { Provide } from '@midwayjs/decorator';
 import { InjectEntityModel } from '@midwayjs/typegoose';
 import { ReturnModelType } from '@typegoose/typegoose';
 import { BaseService } from 'free-midway-component';
-import { Arrange } from '../../entity/dining/arrange.entity';
-type modelType = ReturnModelType<typeof Arrange>;
+import { Personnel } from '../../entity/core/personnel.entity';
+type modelType = ReturnModelType<typeof Personnel>;
 @Provide()
-export class ArrangeService extends BaseService<modelType> {
-  @InjectEntityModel(Arrange)
+export class PersonnelService extends BaseService<modelType> {
+  @InjectEntityModel(Personnel)
   model: modelType;
-}
+}

+ 0 - 98
src/service/dining/order.service.ts

@@ -1,98 +0,0 @@
-import { Inject, Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService, FrameworkErrorEnum, ServiceError } from 'free-midway-component';
-import { Order } from '../../entity/dining/order.entity';
-import { ConfigService } from '../system/config.service';
-import get = require('lodash/get');
-import * as dayjs from 'dayjs';
-import * as isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
-import * as isBetween from 'dayjs/plugin/isBetween';
-dayjs.extend(isSameOrBefore);
-dayjs.extend(isBetween);
-type modelType = ReturnModelType<typeof Order>;
-@Provide()
-export class OrderService extends BaseService<modelType> {
-  @InjectEntityModel(Order)
-  model: modelType;
-
-  @Inject()
-  configService: ConfigService;
-
-  // 根据餐id 获取某餐
-  async getMeal(id: string) {
-    const query = {
-      $or: [{ 'breakfast._id': id }, { 'lunch._id': id }, { 'dinner._id': id }],
-    };
-    const order = await this.model.findOne(query);
-    if (!order) return;
-    let meal;
-    if (id === get(order, 'breakfast._id')) meal = get(order, 'breakfast');
-    else if (id === get(order, 'lunch._id')) meal = get(order, 'lunch');
-    else if (id === get(order, 'dinner._id')) meal = get(order, 'dinner');
-    return meal;
-  }
-
-  // 根据餐id, 取某餐
-  async useMeal(id: string) {
-    const query = {
-      $or: [{ 'breakfast._id': id }, { 'lunch._id': id }, { 'dinner._id': id }],
-    };
-    const order = await this.model.findOne(query);
-    if (!order) throw new ServiceError('未找到该餐的数据!', FrameworkErrorEnum.DATA_NOT_FOUND);
-    let meal;
-    if (id === get(order, 'breakfast._id')) meal = get(order, 'breakfast');
-    else if (id === get(order, 'lunch._id')) meal = get(order, 'lunch');
-    else if (id === get(order, 'dinner._id')) meal = get(order, 'dinner');
-    meal.is_use = true;
-    await order.save();
-  }
-
-  async mealCard(openid: string) {
-    // 找到三餐时间设置,并判断当前时间处于那顿
-    const config = await this.configService.getConfig();
-    if (!config) throw new ServiceError('未找到三餐时间设置!', FrameworkErrorEnum.BAD_ARGS);
-    const { b_time, l_time, d_time } = config;
-    const date = dayjs().format('YYYY-MM-DD');
-    const query = { openid, date };
-    const fields: any = { date: 1 };
-    /**
-     * 三餐时间默认生成.按无法删除方式取值处理即可
-     * 显示情况:
-     *  1.早饭开始时间前: 显示早饭内容
-     *  2.早饭结束时间前: 显示早饭内容
-     *  3.早饭结束时间后-午饭开始时间前: 显示午饭内容
-     *  4.午饭结束时间前: 显示午饭内容
-     *  5.午饭结束时间后-晚饭开始时间前: 显示晚饭内容
-     *  6.晚饭结束时间前: 显示晚饭内容
-     *  7.晚饭结束时间后: 显示明天早饭
-     * */
-    /**早餐开始时间 */
-    const b_s = `${date} ${b_time[0]}`;
-    /**早餐结束时间 */
-    const b_e = `${date} ${b_time[1]}`;
-    /**午餐开始时间 */
-    const l_s = `${date} ${l_time[0]}`;
-    /**午餐结束时间 */
-    const l_e = `${date} ${l_time[1]}`;
-    /**晚餐开始时间 */
-    const d_s = `${date} ${d_time[0]}`;
-    /**晚餐结束时间 */
-    const d_e = `${date} ${d_time[1]}`;
-    if (dayjs().isSameOrBefore(b_e)) {
-      // 1&2
-      fields.breakfast = 1;
-    } else if (dayjs().isBetween(b_e, l_s) && dayjs().isSameOrBefore(l_e)) {
-      // 3+4
-      fields.lunch = 1;
-    } else if (dayjs().isBetween(l_e, d_s) && dayjs().isSameOrBefore(d_e)) {
-      // 5+6
-      fields.dinner = 1;
-    } else if (dayjs().isAfter(d_e)) {
-      query.date = dayjs().add(1, 'day').format('YYYY-MM-DD');
-      fields.breakfast = 1;
-    }
-    const data = await this.model.findOne(query, fields).lean();
-    return data;
-  }
-}

+ 5 - 5
src/service/init.service.ts

@@ -51,6 +51,7 @@ export class InitService {
       { name: '角色管理', parent_id: smId.toString(), order_num: 2, path: '/system/role', component: '/system/role/index', type: '1' },
       { name: '字典管理', parent_id: smId.toString(), order_num: 3, path: '/system/dict', component: '/system/dict/index', type: '1' },
       { name: '字典数据', parent_id: smId.toString(), order_num: 4, path: '/system/dictData', component: '/system/dictData/index', type: '2' },
+      { name: '平台设置', parent_id: smId.toString(), order_num: 5, path: '/system/config', component: '/system/config/index', type: '1' },
     ];
     // 用户管理
     const umId = new ObjectId();
@@ -64,11 +65,10 @@ export class InitService {
     datas.push(...systemMenus, ...userMenus, password);
     // 项目业务菜单
     const busMenus = [
-      { name: '相关设置', order_num: 4, path: '/config', component: '/config/index', type: '1' },
-      { name: '菜品管理', order_num: 5, path: '/menu', component: '/menu/index', type: '1' },
-      { name: '安排管理', order_num: 6, path: '/arrange', component: '/arrange/index', type: '1' },
-      { name: '订单管理', order_num: 7, path: '/order', component: '/order/index', type: '1' },
-      { name: '新闻管理', order_num: 8, path: '/news', component: '/news/index', type: '1' },
+      { name: '业务员管理', order_num: 5, path: '/personnel', component: '/personnel/index', type: '1' },
+      { name: '申办流程管理', order_num: 6, path: '/path', component: '/path/index', type: '1' },
+      { name: '业务管理', order_num: 7, path: '/business', component: '/business/index', type: '1' },
+      { name: '申请记录管理', order_num: 8, path: '/apply', component: '/apply/index', type: '1' },
     ];
     datas.push(...busMenus);
     await this.menusModel.insertMany(datas);

+ 1 - 1
src/service/system/user.service.ts

@@ -8,4 +8,4 @@ type modelType = ReturnModelType<typeof User>;
 export class UserService extends BaseService<modelType> {
   @InjectEntityModel(User)
   model: modelType;
-}
+}