首先当前用户没有删除,其它的update语句也没作用
- ALTER PROCEDURE [dbo].[ACCOUNT_LOGOUT]
- @AccountID varchar(21),
- @nRet smallint OUTPUT
- AS
- BEGIN TRAN
- DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
- COMMIT TRAN
- UPDATE TB_USER SET eTime=getdate() where strAccountID=@AccountID
- DECLARE @sTime smalldatetime,@eTime smalldatetime,@point int
- SET @eTime=getdate()
- SELECT @sTime=sTime,@point=cashPoint FROM TB_USER WHERE strAccountID=@AccountID
- if @point=null
- begin
- set @point=0
- end
- UPDATE TB_USER SET cashPoint=@point+datediff(s,@sTime,@eTime)/60 where strAccountID=@AccountID
- SET @nRet = 1
复制代码 |