fsf1982 发表于 2024-5-1 15:58:55

红月某地图升级不加点存储过程

Create PROCEDURE RMS_INCREASEBONUSQUESTCOUNT
@GameID varchar(14)
AS
set nocount on
declare @IncreaseBonusError int, @InsertLogError int, @STotalBonus int ,@iMap int
set @IncreaseBonusError = 1
set @InsertLogError = 1
set @STotalBonus = 0
begin transaction
select @STotalBonus=STotalBonus,@iMap=map from tblGameID1 where GameID = @GameID
--下面的30000就是要封的点数了 红色的0就要地图编号
if @STotalBonus<30000and @iMap<>0
begin
update tblGameID1 set SBonus = SBonus + 1,STotalBonus = STotalBonus +1 where GameID = @GameID
set @IncreaseBonusError = @@ERROR
end
select @STotalBonus = STotalBonus from tblGameID1 where GameID = @GameID
insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 1)
set @InsertLogError = @@ERROR
if @IncreaseBonusError = 0 AND @InsertLogError = 0
begin
commit transaction
end
else
begin
rollback transaction
end
GO



liangxw520 发表于 2024-5-1 20:43:01

感谢楼主的分享!很实用,学到很多东西!!楼主加油多分享点使用的东西哦!!加油加油!!

Chinese.Doll 发表于 2024-7-12 09:06:07

!上向天天,习学好好

10645430 发表于 2024-7-12 22:20:22

!上向天天,习学好好

Chinese.Doll 发表于 2024-7-17 15:49:26

!上向天天,习学好好
页: [1]
查看完整版本: 红月某地图升级不加点存储过程