合并分支 'dev' 到 'test'
fix:修复批量删除用户 查看合并请求 !18
正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
.DS_Store
0 → 100644
不能预览此文件类型
@@ -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)) |
-
请 注册 或 登录 后发表评论