作者 陈志颖

fix:修复批量删除用户

不能预览此文件类型
@@ -22,7 +22,7 @@ func (dao *EmployeeDao) BatchRemove(uids []int64) error { @@ -22,7 +22,7 @@ func (dao *EmployeeDao) BatchRemove(uids []int64) error {
22 // pg.In(uids)) 22 // pg.In(uids))
23 //return err 23 //return err
24 tx := dao.transactionContext.PgTx 24 tx := dao.transactionContext.PgTx
25 - _, err := tx.QueryOne( 25 + _, err := tx.Query(
26 pg.Scan(), 26 pg.Scan(),
27 "UPDATE employees SET status = 2 WHERE uid IN (?)", 27 "UPDATE employees SET status = 2 WHERE uid IN (?)",
28 pg.In(uids)) 28 pg.In(uids))
@@ -32,7 +32,7 @@ func (dao *EmployeeDao) BatchRemove(uids []int64) error { @@ -32,7 +32,7 @@ func (dao *EmployeeDao) BatchRemove(uids []int64) error {
32 // 设置用户状态 32 // 设置用户状态
33 func (dao *EmployeeDao) BatchSetStatus(uids []int64, status int) error { 33 func (dao *EmployeeDao) BatchSetStatus(uids []int64, status int) error {
34 tx := dao.transactionContext.PgTx 34 tx := dao.transactionContext.PgTx
35 - _, err := tx.QueryOne( 35 + _, err := tx.Query(
36 pg.Scan(), 36 pg.Scan(),
37 "UPDATE employees SET status=? WHERE uid IN (?)", 37 "UPDATE employees SET status=? WHERE uid IN (?)",
38 status, pg.In(uids)) 38 status, pg.In(uids))