fix: fail to update user's update_ts (#2410)

This commit is contained in:
Athurg Gooth 2023-10-20 19:10:38 +08:00 committed by GitHub
parent 664c9c4a7c
commit af7c0a76d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ func (d *DB) CreateUser(ctx context.Context, create *store.User) (*store.User, e
func (d *DB) UpdateUser(ctx context.Context, update *store.UpdateUser) (*store.User, error) {
set, args := []string{}, []any{}
if v := update.UpdatedTs; v != nil {
set, args = append(set, "`updated_ts` = ?"), append(args, *v)
set, args = append(set, "`updated_ts` = FROM_UNIXTIME(?)"), append(args, *v)
}
if v := update.RowStatus; v != nil {
set, args = append(set, "`row_status` = ?"), append(args, *v)