search startDate and endDate
This commit is contained in:
parent
ee610c5686
commit
0aba9f9865
20 changed files with 123 additions and 32 deletions
|
|
@ -51,6 +51,7 @@ import {
|
|||
connectOrNot,
|
||||
queryOrNot,
|
||||
whereAddressQuery,
|
||||
whereDateQuery,
|
||||
} from "../utils/relation";
|
||||
import { isUsedError, notFoundError, relationError } from "../utils/error";
|
||||
import { retry } from "../utils/func";
|
||||
|
|
@ -305,6 +306,8 @@ export class UserController extends Controller {
|
|||
@Query() status?: Status,
|
||||
@Query() responsibleDistrictId?: string,
|
||||
@Query() activeBranchOnly?: boolean,
|
||||
@Query() startDate?: Date,
|
||||
@Query() endDate?: Date,
|
||||
@Body()
|
||||
body?: {
|
||||
userId?: string[];
|
||||
|
|
@ -368,6 +371,7 @@ export class UserController extends Controller {
|
|||
},
|
||||
},
|
||||
},
|
||||
...whereDateQuery(startDate, endDate),
|
||||
} satisfies Prisma.UserWhereInput;
|
||||
|
||||
const [result, total] = await prisma.$transaction([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue