|
@@ -4,12 +4,16 @@ 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 })
|
|
@@ -45,6 +49,7 @@ export class AssociationController extends BaseController {
|
|
|
@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;
|
|
|
}
|
|
|
|