update select list activity
This commit is contained in:
@ -100,8 +100,17 @@ export class UserActivityController {
|
|||||||
.leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user')
|
.leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user')
|
||||||
.where(whereAttr, whereVal);
|
.where(whereAttr, whereVal);
|
||||||
const res_list = userRepository.createQueryBuilder()
|
const res_list = userRepository.createQueryBuilder()
|
||||||
// .addSelect('(SELECT u.username FROM users u WHERE u.id = id_user)', 'username')
|
.select(
|
||||||
.leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user')
|
'id,\n\
|
||||||
|
id_user,\n\
|
||||||
|
module,\n\
|
||||||
|
description,\n\
|
||||||
|
action,\n\
|
||||||
|
url,\n\
|
||||||
|
application,\n\
|
||||||
|
created_at')
|
||||||
|
.addSelect('(SELECT u.username FROM users u WHERE u.id = id_user)', 'username')
|
||||||
|
// .leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user')
|
||||||
.where(whereAttr, whereVal)
|
.where(whereAttr, whereVal)
|
||||||
.orderBy(param.order_field, param.order_direction)
|
.orderBy(param.order_field, param.order_direction)
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
|
|||||||
Reference in New Issue
Block a user