fix: unstake
This commit is contained in:
@@ -49,8 +49,8 @@ func (m *customNhTaskNftStakeModel) FindByUid(ctx context.Context, uid uint) ([]
|
||||
}
|
||||
|
||||
func (m *customNhTaskNftStakeModel) UnStakeNft(ctx context.Context, uid uint, token string, isTransferOut bool) error {
|
||||
update := fmt.Sprintf("UPDATE %s SET `state` = 0 WHERE `token_id` = ?", m.table)
|
||||
result, err := m.conn.ExecCtx(ctx, update, uid, token)
|
||||
update := fmt.Sprintf("UPDATE %s SET `state` = 0 WHERE `token_id` = ? AND `uid` = ?", m.table)
|
||||
result, err := m.conn.ExecCtx(ctx, update, token, uid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user