feat(product-family): link-level tags (origin_good_tags) with manual override + member detail enrichment
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { Controller, Get, Query, UseGuards } from '@nestjs/common';
|
||||
import { Body, Controller, Delete, Get, Param, Put, Query, UseGuards } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
import { OriginGoodsService } from './origin-goods.service';
|
||||
import { QueryOriginGoodDto } from './dto/query-origin-good.dto';
|
||||
import { UpdateOriginGoodTagsDto } from './dto/update-origin-good-tags.dto';
|
||||
|
||||
@ApiTags('origin-goods')
|
||||
@ApiBearerAuth()
|
||||
@@ -24,4 +25,22 @@ export class OriginGoodsController {
|
||||
findAll(@Query() query: QueryOriginGoodDto) {
|
||||
return this.service.findAll(query);
|
||||
}
|
||||
|
||||
@Get(':id/tags')
|
||||
@ApiOperation({ summary: '链接当前标签(含 manual 标记)' })
|
||||
getTags(@Param('id') id: string) {
|
||||
return this.service.getTags(BigInt(id));
|
||||
}
|
||||
|
||||
@Put(':id/tags')
|
||||
@ApiOperation({ summary: '人工接管链接标签(全量替换,自动同步不再覆盖)' })
|
||||
updateTags(@Param('id') id: string, @Body() dto: UpdateOriginGoodTagsDto) {
|
||||
return this.service.updateTags(BigInt(id), dto.tagIds);
|
||||
}
|
||||
|
||||
@Delete(':id/tags')
|
||||
@ApiOperation({ summary: '恢复自动派生(清掉人工标签)' })
|
||||
resetTags(@Param('id') id: string) {
|
||||
return this.service.resetTags(BigInt(id));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user