File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ class AdminDao {
3838 type : db . QueryTypes . SELECT
3939 }
4040 ) ;
41- let total = await db . query (
42- 'SELECT COUNT(*) as count FROM lin_user WHERE lin_user.admin=:admin AND lin_user.delete_time IS NULL' ,
43- {
44- replacements : {
45- admin : UserAdmin . COMMON
46- } ,
47- type : db . QueryTypes . SELECT
48- }
49- ) ;
41+ let sql1 =
42+ 'SELECT COUNT(*) as count FROM lin_user WHERE lin_user.admin=:admin AND lin_user.delete_time IS NULL' ;
43+ groupId && ( sql1 += ` lin_user.group_id= ${ groupId } ` ) ;
44+ let total = await db . query ( sql1 , {
45+ replacements : {
46+ admin : UserAdmin . COMMON
47+ } ,
48+ type : db . QueryTypes . SELECT
49+ } ) ;
5050 users . map ( user => {
5151 unsets ( user , [ 'update_time' , 'delete_time' , 'password' ] ) ;
5252 user . create_time = dayjs ( user . create_time ) . unix ( ) ;
You can’t perform that action at this time.
0 commit comments