数据库中一些简单的防刷机制
update t_userinfo set lastupdatetime = getdate() where userid = @userid and lastupdatetime < dateadd(second,-5,getdate() )

if(@@rowcount = 0 )
begin
    set @outmsg = '刷新太频繁'
    return
end

条件是距离上次更新必须至少多5秒
where userid = @userid and lastupdatetime < dateadd(second,-5,getdate() )

相关文章:

  • 2021-06-03
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-11-20
  • 2021-11-24
  • 2021-07-05
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2021-07-13
  • 2021-11-29
  • 2021-04-08
  • 2021-09-16
  • 2022-02-07
  • 2021-10-10
相关资源
相似解决方案