DECLARE @intUserID INT,@Amount INT, @Clubid INT,@AmountTmp INTDECLARE cur_ClubHeadCash CURSOR FAST_FORWARD READ_ONLY FOR SELECT userid,cid,cash FROM #temp WHERE userid not in() ORDER BY userid ASCOPEN cur_ClubHeadCash FETCH NEXT FROM cur_ClubHeadCash INTO @intUserID, @Clubid, @AmountWHILE @@FETCH_STATUS = 0 BEGIN
讯享网讯享网<span style="color: rgba(0, 0, 255, 1)">PRINT</span> <span style="color: rgba(0, 128, 0, 1)">@intUserID</span> <span style="color: rgba(0, 0, 255, 1)">PRINT</span> <span style="color: rgba(0, 128, 0, 1)">@Clubid</span> <span style="color: rgba(0, 0, 255, 1)">PRINT</span> <span style="color: rgba(0, 128, 0, 1)">@Amount</span> <span style="color: rgba(0, 0, 255, 1)">SET</span> <span style="color: rgba(0, 128, 0, 1)">@AmountTmp</span><span style="color: rgba(128, 128, 128, 1)">=</span> <span style="color: rgba(0, 128, 0, 1)">@Amount</span><span style="color: rgba(128, 128, 128, 1)">*-</span><span style="color: rgba(128, 0, 0, 1); font-weight: bold">1</span> <span style="color: rgba(0, 0, 255, 1)">PRINT</span> <span style="color: rgba(0, 128, 0, 1)">@AmountTmp</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)">EXEC dbo.PrPsWeb_UpdateClubCash </span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> @Clubid,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> 13001,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> @AmountTmp,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> '127.0.0.1',</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> '管理员减少房卡',</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> NULL,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> 0</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)">EXEC dbo.PrPsWeb_UpdateUserCash</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> @intUserID,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> 13000,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> @Amount,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> '127.0.0.1',</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> '管理员增加金币',</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> NULL,</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)"> 0 </span> <span style="color: rgba(0, 0, 255, 1)">FETCH</span> <span style="color: rgba(0, 0, 255, 1)">NEXT</span> <span style="color: rgba(0, 0, 255, 1)">FROM</span> cur_ClubHeadCash <span style="color: rgba(0, 0, 255, 1)">INTO</span> <span style="color: rgba(0, 128, 0, 1)">@intUserID</span>,<span style="color: rgba(0, 128, 0, 1)">@Clubid</span>,<span style="color: rgba(0, 128, 0, 1)">@Amount</span>ENDCLOSE cur_ClubHeadCash DEALLOCATE cur_ClubHeadCashDROP TABLE #temp
讯享网

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/157964.html