增加查询访客
continuous-integration/drone/push Build is passing Details

main
rustdreamer 2 years ago
parent b97b973e75
commit ad4be23108

@ -260,6 +260,11 @@ export class QueryVisitorByNumberDto {
@IsString()
@IsNotEmpty()
identity_card_no: string
@ApiPropertyOptional({ description: "", required: false })
@IsString()
@IsOptional()
area_code?: string
}
@Controller()
@ -301,11 +306,15 @@ export class AppController {
// }
@Get("/visitor")
@ApiBearerAuth()
async getVisiotr(@Query() { identity_card_no }: QueryVisitorByNumberDto, @Req() req: any) {
async getVisiotr(@Query() { identity_card_no, area_code }: QueryVisitorByNumberDto, @Req() req: any) {
let date = new Date().toDateString();
let node_other_visitor;
const where: any = { identity_card_no, end_time: IsNull() };
if (area_code) {
where.to_area_code = area_code;
}
const node_other_visitors: any = await this.nodeOtherVisitorRepository.find({
where: { identity_card_no, end_time: IsNull() },
where,
order: {
created_date: "DESC"
}

Loading…
Cancel
Save