| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Pointcloud } from '../../entity/pointcloud'; |
| | | import { PointcloudService } from '../../service/pointcloud'; |
| | | import { DataController } from '../../../base/controller/dataController'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Pointcloud, |
| | | service: PointcloudService, |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Pointcloud, |
| | | service: PointcloudService, |
| | | }) |
| | | export class AdminPointcloudController extends DataController { |
| | | @Inject() |
| | | pointcloudService: PointcloudService; |
| | | export class PointcloudController extends DataController { |
| | | @Inject() |
| | | pointcloudService: PointcloudService; |
| | | |
| | | /** |
| | | * 获得数据 |
| | | */ |
| | | @Get('/getdata', { summary: '数据接口' }) |
| | | async getData(@Query(ALL) params: any) { |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | /** |
| | | * 获得数据 |
| | | */ |
| | | @Get('/postdata', { summary: '数据接口' }) |
| | | async postData(@Query(ALL) params: any) { |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | } |