update users set email = '
This commit is contained in:
@ -84,14 +84,18 @@ export class UserController {
|
|||||||
const { whereAttr, whereVal } = CommonHelper.handleFilter({
|
const { whereAttr, whereVal } = CommonHelper.handleFilter({
|
||||||
filter: param.filter,
|
filter: param.filter,
|
||||||
col_any_eq: ["email"],
|
col_any_eq: ["email"],
|
||||||
col_any_like: ["User.name", "User.username"],
|
col_any_like: ["User.name", "User.username", "roles.name"], // ← tambah roles.name
|
||||||
});
|
});
|
||||||
|
|
||||||
const res_count = userRepository.createQueryBuilder().where(whereAttr, whereVal);
|
const res_count = userRepository
|
||||||
|
.createQueryBuilder("User")
|
||||||
|
.leftJoin("User.roles", "roles")
|
||||||
|
.where(whereAttr, whereVal);
|
||||||
|
|
||||||
const subquery = userRepository
|
const subquery = userRepository
|
||||||
.createQueryBuilder("User")
|
.createQueryBuilder("User")
|
||||||
.select("User.id", "id")
|
.select("User.id", "id")
|
||||||
|
.leftJoin("User.roles", "roles")
|
||||||
.where(whereAttr, whereVal)
|
.where(whereAttr, whereVal)
|
||||||
.orderBy("User." + param.order_field, param.order_direction)
|
.orderBy("User." + param.order_field, param.order_direction)
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
|
|||||||
Reference in New Issue
Block a user