เพิ่ม order

This commit is contained in:
kittapath 2024-09-16 16:59:48 +07:00
parent d3aa76b3f8
commit 008add7398
4 changed files with 27 additions and 4 deletions

View file

@ -53,7 +53,7 @@ export class CommandSalaryController extends Controller {
"createdFullName",
"lastUpdateFullName",
],
order: { name: "ASC" },
order: { createdAt: "ASC" },
});
return new HttpSuccess(_commandSalary);
}
@ -91,7 +91,7 @@ export class CommandSalaryController extends Controller {
: `${commandSysId}`,
},
)
.orderBy("commandSalary.name", "ASC")
.orderBy("commandSalary.createdAt", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();

View file

@ -59,7 +59,7 @@ export class CommandTypeController extends Controller {
"createdFullName",
"lastUpdateFullName",
],
order: { createdAt: "ASC" },
order: { order: "ASC" },
});
return new HttpSuccess(_commandType);
}
@ -85,7 +85,7 @@ export class CommandTypeController extends Controller {
isActive == null || isActive == undefined ? null : `${isActive == true ? 1 : 0}`,
},
)
.orderBy("commandType.createdAt", "ASC")
.orderBy("commandType.order", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();