fix
This commit is contained in:
parent
152d813bb4
commit
7ed90ba142
2 changed files with 8 additions and 8 deletions
|
|
@ -1948,7 +1948,7 @@ export class ProfileController extends Controller {
|
|||
const take = pageSize;
|
||||
switch (body.fieldName) {
|
||||
case "citizenId":
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: { citizenId: Like(`%${body.keyword}%`) },
|
||||
relations: [
|
||||
"posType",
|
||||
|
|
@ -1967,7 +1967,7 @@ export class ProfileController extends Controller {
|
|||
break;
|
||||
|
||||
case "firstname":
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: { firstName: Like(`%${body.keyword}%`) },
|
||||
relations: [
|
||||
"posType",
|
||||
|
|
@ -1986,7 +1986,7 @@ export class ProfileController extends Controller {
|
|||
break;
|
||||
|
||||
case "lastname":
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: { lastName: Like(`%${body.keyword}%`) },
|
||||
relations: [
|
||||
"posType",
|
||||
|
|
@ -2005,7 +2005,7 @@ export class ProfileController extends Controller {
|
|||
break;
|
||||
|
||||
default:
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
relations: [
|
||||
"posType",
|
||||
"posLevel",
|
||||
|
|
|
|||
|
|
@ -1370,7 +1370,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
const take = pageSize;
|
||||
switch (body.fieldName) {
|
||||
case "citizenId":
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: { citizenId: Like(`%${body.keyword}%`) },
|
||||
relations: [
|
||||
"posType",
|
||||
|
|
@ -1389,7 +1389,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
break;
|
||||
|
||||
case "firstname":
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: { firstName: Like(`%${body.keyword}%`) },
|
||||
relations: [
|
||||
"posType",
|
||||
|
|
@ -1408,7 +1408,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
break;
|
||||
|
||||
case "lastname":
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: { lastName: Like(`%${body.keyword}%`) },
|
||||
relations: [
|
||||
"posType",
|
||||
|
|
@ -1427,7 +1427,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
break;
|
||||
|
||||
default:
|
||||
[findProfile, total] = await this.profileRepo.find({
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
relations: [
|
||||
"posType",
|
||||
"posLevel",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue