ValidCodeLogin=@ValidCodeLogin)
begin
select @validFlag=-1 --用户尚未登录
return
end
select @LoginTime = (select LoginTime from UserBaseInfo where ValidCodeLogin=@ValidCodeLogin)
select @curTime=getdate()
select @diffTime=datediff(hh,@LoginTime,@curTime)
if @diffTime>=10
begin
select @validFlag=-2 --用户超时
return
end
select @LoginTime=getdate() --取得用户最后登录时间
update UserBaseInfo set LoginTime=@LoginTime where ValidCodeLogin=@ValidCodeLogin
select @validFlag=0
return
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
上一页 [1] [2]