用户信息记录脚本superfox1个月前发布关注私信04310 用户积分变操作记录脚本UserChangeInfo.sql,作用于WHJHTreasureDB表创建用户积分变化表NET_PM_UserChangeInfo。 脚本内容: USE WHJHTreasureDB GO SET ANSI_NULLS, QUOTED_IDENTIFIER ON GO --用/户/金/币/变/化/表 CREATE proc NET_PM_UserChangeInfo @dwGameID INT, --GameID @dwRowNumber INT --行号 WITH ENCRYPTION AS -- 属性设置 SET NOCOUNT ON begin --声明临时表 declare @t table(GameID int,TransDate datetime,type int,ScoreBalance decimal(18,2),***Balance decimal(18,2),BalanceChange decimal(18,2),Balance decimal(18,2),KindID int,GameName nvarchar(50),ip nvarchar(50),EnterTime datetime,LeaveTime datetime) --插/入/线/上/充/值/表 type=1 insert into @t(GameID,TransDate,type,BalanceChange) select GameID,PayDate,1,Diamond from WHJHTreasureDB.dbo.OnlinePayOrder where Gameid=@dwGameID and OrderStatus=1 --插/入/线/下/充/值/扣/除/表 type=2 insert into @t(GameID,TransDate,type,BalanceChange) select GameID,createDate,2,CONVERT(decimal(18,2),amount)/100 from WHJHTreasureDB.dbo.OfflineRecord where GameID=@dwGameID --插/入/提/现/记/录 type=3 insert into @t(GameID,TransDate,type,BalanceChange) select b.GameID,a.ApplyTime,3,CONVERT(decimal(18,2),a.Money)/100*-1 from WHJHTreasureDB.dbo.GameScoreDraw a inner join WHJHAccountsDB.dbo.Accountsinfo b on a.UserId=b.UserID where b.GameID=@dwGameID --插/入/提/现/退/回/记/录 type=9 insert into @t(GameID,TransDate,type,BalanceChange) select b.GameID,a.UpdateTime,9,CONVERT(decimal(18,2),a.Money)/100 from WHJHTreasureDB.dbo.GameScoreDraw a inner join WHJHAccountsDB.dbo.Accountsinfo b on a.UserId=b.UserID where b.GameID=@dwGameID and a.Status =-1 --插/入/银/行/存/款/记/录 type=4 insert into @t(GameID,TransDate,type,ScoreBalance,***Balance,BalanceChange,Balance) Select a.GameID,b.CollectDate,4,CONVERT(decimal(18,2),b.SourceGold)/100,CONVERT(decimal(18,2),b.Source***)/100,CONVERT(decimal(18,2),b.SwapScore)/100*-1,(CONVERT(decimal(18,2),b.SourceGold)-CONVERT(decimal(18,2),b.SwapScore))/100 from WHJHTreasureDB.dbo.RecordInsure b inner join WHJHAccountsDB.dbo.AccountsInfo a on b.SourceUserID=a.UserID where a.GameID=@dwGameID and TradeType=1 --插/入/银/行/取/款/记/录 type=5 insert into @t(GameID,TransDate,type,ScoreBalance,***Balance,BalanceChange,Balance) Select a.GameID,b.CollectDate,5,CONVERT(decimal(18,2),b.SourceGold)/100,CONVERT(decimal(18,2),b.Source***)/100,CONVERT(decimal(18,2),b.SwapScore)/100,(CONVERT(decimal(18,2),b.SourceGold)+CONVERT(decimal(18,2),b.SwapScore))/100 from WHJHTreasureDB.dbo.RecordInsure b inner join WHJHAccountsDB.dbo.AccountsInfo a on b.SourceUserID=a.UserID where a.GameID=@dwGameID and TradeType=2 --插/入/注/册/送/金/币/表 type=6 insert into @t(GameID,TransDate,type,ScoreBalance,***Balance,BalanceChange,Balance) Select b.GameID,a.CollectDate,6,CONVERT(decimal(18,2),a.PreScore)/100,CONVERT(decimal(18,2),a.PreInsureScore)/100,CONVERT(decimal(18,2),a.PresentScore)/100,(CONVERT(decimal(18,2),a.PreScore)+CONVERT(decimal(18,2),a.PresentScore))/100 from WHJHTreasureDB.dbo.RecordPresentInfo a inner join WHJHAccountsDB.dbo.Accountsinfo b on a.UserID=b.UserID where b.GameID=@dwGameID --插/入/绑/手/机送//金/币/表 type=7 insert into @t(GameID,TransDate,type,BalanceChange) Select b.GameID,a.CollectDate,7,CONVERT(decimal(18,2),a.PresentScore)/100 from WHJHTreasureDB.dbo.ScorePresentInfo a inner join WHJHAccountsDB.dbo.AccountsInfo b on a.UserID=b.UserID where b.GameID=@dwGameID --插/入/游/戏/输/赢/表 type=8 insert into @t(GameID,TransDate,type,ScoreBalance,***Balance,BalanceChange,KindID,GameName,ip,EnterTime,LeaveTime) Select b.GameID,a.EnterTime,8,CONVERT(decimal(18,2),a.EnterScore)/100,CONVERT(decimal(18,2),a.EnterInsure)/100,CONVERT(decimal(18,2),a.Score)/100,c.KindID,c.KindName,a.EnterClientIP,a.EnterTime,a.LeaveTime from WHJHTreasureDB.dbo.RecordUserInout a inner join WHJHAccountsDB.dbo.AccountsInfo b on a.UserID=b.UserID inner join WHJHPlatformDB.dbo.GameKindItem c on a.KindID=c.KindID where b.GameID=@dwGameID select top 20 o.*,(Select COUNT(*) from @t) as DataAmount from (select row_number() over(order by TransDate desc) as rownumber,* from(Select * from @t) as oo ) as o where rownumber>@dwRowNumber; return 0 END GO END! © 版权声明 版权声明 本站名称: 源码狐 本站所有资源均来源于互联网,不保证100%完整、不提供任何技术支持 本站所发布的文章以及附件仅限用于学习和研究目的; 不得用于商业或者非法用途;否则由此产生的法律后果,本站概不负责! 侵权说明: 如本站发布资源有侵权或违规,请邮件联系 nqttfe@163.com 删除处理。 下载说明: 关于蓝奏云下载链接失效问题,将原链接(lanzouo.com)中的o替换为(任意英文字母)再进行访问! THE END技术教程# 教程# 网狐脚本 喜欢就支持一下吧点赞10收藏 superfox关注 08007713476 这家伙很懒,什么都没有写... 远程服务器文件备份工具远程服务器文件备份工具3个月前 82网狐二开街机电玩完美修复版全套数据+双端网狐二开街机电玩完美修复版全套数据+双端3个月前 72蒙特系列麻将胡了(修复运营版)蒙特系列麻将胡了(修复运营版)3个月前 71UU=修复转账记录和控制等UU=修复转账记录和控制等1个月前 66网狐二开电玩系列天宫捕鱼全套安卓+PC+苹果+控制端网狐二开电玩系列天宫捕鱼全套安卓+PC+苹果+控制端3个月前 63[Windows] win11好用的影子系统:重启还原2.5[Windows] win11好用的影子系统:重启还原2.53个月前 61 上一篇 网狐荣耀系列存储脚本GSP_GR_QueryGameTypeID 下一篇 绑定手机查询统计脚本 相关推荐 连远程桌面出现身份验证错误要求的函数不受支持修复补丁连远程桌面出现身份验证错误要求的函数不受支持修复补丁1个月前 53网狐系列游戏房间机器人添加教程网狐系列游戏房间机器人添加教程1个月前 53数据库异常找不到存储过程GSP_GR_LoadSensitiveWords解决方法数据库异常找不到存储过程GSP_GR_LoadSensitiveWords解决方法1个月前 49新金苹果大字翻牌机明星97新版安卓端(附控制说明)新金苹果大字翻牌机明星97新版安卓端(附控制说明)1个月前 44 评论 抢沙发 请登录后发表评论 登录 注册 暂无评论内容 本站资源来源于网络收集,仅供研究学习交流使用请勿商业运营,严禁从事任何违法侵权等非法行为,否则后果自负,任何法律责任与本站无关! 在手机上浏览此页面 登录没有账号?立即注册用户名或邮箱登录密码记住登录找回密码登录注册已有账号,立即登录设置用户名设置密码重复密码注册 欢迎来到源码狐 资源互换请联系站长 网站资源来源网络,本站分享仅供学习研究,请在24小时后删除,请勿用于商业和违法用途!违者自行承担法律责任,任何违法相关与本站无关!如对资源存在侵权或者违规,请联系站长删除资源 联系站长