@Override
    public void handle(SeckillWebMockRequestDTO request) {
        Seckill entity = new Seckill();
        entity.setSeckillId(request.getSeckillId());
        entity.setNumber(request.getSeckillCount());
        seckillMapper.updateById(entity);

        // 清理已成功秒杀记录
        SuccessKilled example = new SuccessKilled();
        example.setSeckillId(request.getSeckillId());
        successKilledMapper.delete(new QueryWrapper<>(example));
    }
@Test
    public void shouldUpdateSeckillAndDeleteSuccessKilled() {
        SeckillWebMockRequestDTO request = new SeckillWebMockRequestDTO();
        request.setSeckillId(123L);
        request.setSeckillCount(10);

        databasePreRequestHandler.handle(request);

        verify(seckillMapper, times(1)).updateById(any(Seckill.class));
        verify(successKilledMapper, times(1)).delete(any());
    }