|
@@ -4,6 +4,7 @@ import { BrandService } from '../../service/system/brand.service';
|
|
|
import { CDTO_brand, CVO_brand, FVO_brand, QDTO_brand, QVO_brand, UDTO_brand, UVAO_brand } from '../../interface/system/brand.interface';
|
|
|
import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
|
|
|
import { Validate } from '@midwayjs/validate';
|
|
|
+import get = require('lodash/get');
|
|
|
@ApiTags(['品牌'])
|
|
|
@Controller('/brand')
|
|
|
export class BrandController extends BaseController {
|
|
@@ -32,6 +33,15 @@ export class BrandController extends BaseController {
|
|
|
return { data, total };
|
|
|
}
|
|
|
|
|
|
+ @Get('/index')
|
|
|
+ @ApiQuery({ name: 'queryIndex' })
|
|
|
+ async queryIndex() {
|
|
|
+ const list = await this.service.queryIndex();
|
|
|
+ const data1 = get(list, 'data1');
|
|
|
+ const data2 = get(list, 'data2');
|
|
|
+ return { data1, data2 };
|
|
|
+ }
|
|
|
+
|
|
|
@Get('/:id')
|
|
|
@ApiResponse({ type: FVO_brand })
|
|
|
async fetch(@Param('id') id: string) {
|