แก้ query total
This commit is contained in:
parent
b433a44000
commit
ba00645cb8
5 changed files with 124 additions and 65 deletions
|
|
@ -57,7 +57,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
const [kpiUserEvaluation, total] = await AppDataSource.getRepository(KpiUserEvaluation)
|
||||
.createQueryBuilder("kpiUserEvaluation")
|
||||
.andWhere(kpiPeriodId ? "kpiPeriodId LIKE :kpiPeriodId" : "1=1", {
|
||||
kpiPeriodId: `%${kpiPeriodId}%`,
|
||||
kpiPeriodId: kpiPeriodId,
|
||||
})
|
||||
.orderBy("kpiUserEvaluation.createdAt", "ASC")
|
||||
.skip((page - 1) * pageSize)
|
||||
|
|
@ -212,7 +212,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
const [kpiUserEvaluation, total] = await AppDataSource.getRepository(KpiUserEvaluation)
|
||||
.createQueryBuilder("kpiUserEvaluation")
|
||||
.andWhere(kpiPeriodId ? "kpiPeriodId LIKE :kpiPeriodId" : "1=1", {
|
||||
kpiPeriodId: `%${kpiPeriodId}%`,
|
||||
kpiPeriodId: kpiPeriodId,
|
||||
})
|
||||
.orderBy("kpiUserEvaluation.createdAt", "ASC")
|
||||
.skip((page - 1) * pageSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue