
-- --------------------------------------------------------

--
-- 表的结构 `zjr_game_coin_trans`
--

CREATE TABLE `zjr_game_coin_trans` (
  `TransId` bigint(20) UNSIGNED NOT NULL,
  `OkFlag` varchar(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `UserId` bigint(13) UNSIGNED NOT NULL,
  `TransTmk` datetime NOT NULL,
  `TransAmt` bigint(20) NOT NULL,
  `TransCat` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `RefId` bigint(20) UNSIGNED NOT NULL,
  `TransMemo` varchar(50) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='游戏币交易记录';

--
-- 转存表中的数据 `zjr_game_coin_trans`
--

INSERT INTO `zjr_game_coin_trans` (`TransId`, `OkFlag`, `UserId`, `TransTmk`, `TransAmt`, `TransCat`, `RefId`, `TransMemo`) VALUES
(1, '0', 4308211020301, '2015-12-01 19:06:41', 100, '45', 0, '注册成功赠送'),
(2, '0', 4308211020302, '2015-12-01 19:11:29', 100, '45', 0, '注册成功赠送'),
(3, '0', 4308211020303, '2015-12-01 19:18:17', 100, '45', 0, '注册成功赠送'),
(4, '0', 4308211020302, '2015-12-01 19:26:30', -100, '62', 1, '兑换游戏分数'),
(5, '0', 4308211020301, '2015-12-01 19:30:10', -100, '62', 3, '兑换游戏分数'),
(6, '0', 4308211020303, '2015-12-01 19:30:12', -100, '62', 4, '兑换游戏分数'),
(7, '0', 4308211020304, '2015-12-02 13:49:28', 100, '45', 0, '注册成功赠送'),
(8, '0', 4308211020305, '2015-12-02 14:26:15', 100, '45', 0, '注册成功赠送'),
(9, '0', 4308211020306, '2015-12-02 15:19:51', 100, '45', 0, '注册成功赠送'),
(10, '0', 4308211020313, '2015-12-02 15:50:53', 100, '45', 0, '注册成功赠送'),
(11, '0', 4308211020314, '2015-12-02 16:50:56', 100, '45', 0, '注册成功赠送'),
(12, '0', 4308211020315, '2015-12-02 19:06:16', 100, '45', 0, '注册成功赠送'),
(13, '0', 4308211020316, '2015-12-02 21:44:22', 100, '45', 0, '注册成功赠送'),
(14, '0', 4308211020306, '2015-12-02 21:48:48', -100, '62', 11, '兑换游戏分数'),
(15, '0', 4308211020317, '2015-12-03 11:28:11', 100, '45', 0, '注册成功赠送'),
(16, '0', 4308211020314, '2015-12-03 13:13:17', 100, '45', 0, '注册成功赠送'),
(63, '0', 4308211020344, '2016-01-16 15:02:56', 100, '45', 0, '注册成功赠送'),
(64, '0', 4308211020345, '2016-01-17 14:36:45', 100, '45', 0, '注册成功赠送'),
(20, '0', 4308211020302, '2015-12-15 19:16:55', 2, '17', 0, '微信购买'),
(21, '0', 4308211020302, '2015-12-15 19:20:12', 2, '17', 0, '微信购买'),
(22, '0', 4308211020312, '2016-01-05 15:12:52', 100, '45', 0, '注册成功赠送'),
(62, '0', 4308211020343, '2016-01-15 17:40:51', 100, '45', 0, '注册成功赠送'),
(61, '0', 4308211020342, '2016-01-15 12:23:59', 100, '45', 0, '注册成功赠送'),
(56, '0', 4308211020339, '2016-01-13 16:38:10', 100, '45', 0, '注册成功赠送'),
(58, '0', 4308211020340, '2016-01-13 19:38:54', 100, '45', 0, '注册成功赠送'),
(54, '0', 4308211020319, '2016-01-13 14:55:40', 100, '45', 0, '注册成功赠送'),
(59, '0', 4308211020318, '2016-01-13 21:30:35', 100, '45', 0, '注册成功赠送'),
(30, '0', 4308211020320, '2016-01-10 20:01:40', 100, '45', 0, '注册成功赠送'),
(31, '0', 4308211020321, '2016-01-10 20:15:59', 100, '45', 0, '注册成功赠送'),
(32, '0', 4308211020321, '2016-01-11 12:52:33', 100, '45', 0, '注册成功赠送'),
(33, '0', 4308211020322, '2016-01-11 13:03:44', 100, '45', 0, '注册成功赠送'),
(34, '0', 4308211020323, '2016-01-11 13:20:28', 100, '45', 0, '注册成功赠送'),
(35, '0', 4308211020324, '2016-01-11 14:05:50', 100, '45', 0, '注册成功赠送'),
(36, '0', 4308211020325, '2016-01-11 15:38:06', 100, '45', 0, '注册成功赠送'),
(37, '0', 4308211020326, '2016-01-11 16:01:36', 100, '45', 0, '注册成功赠送'),
(38, '0', 4308211020327, '2016-01-11 16:19:13', 100, '45', 0, '注册成功赠送'),
(39, '0', 4308211020326, '2016-01-11 16:57:59', 100, '45', 0, '注册成功赠送'),
(40, '0', 4308211020328, '2016-01-11 17:56:32', 100, '45', 0, '注册成功赠送'),
(41, '0', 4308211020329, '2016-01-11 19:23:25', 100, '45', 0, '注册成功赠送'),
(42, '0', 4308211020329, '2016-01-11 20:14:59', 2, '17', 0, '微信购买'),
(43, '0', 4308211020330, '2016-01-11 21:31:35', 100, '45', 0, '注册成功赠送'),
(44, '0', 4308211020326, '2016-01-11 22:37:35', 100, '45', 0, '注册成功赠送'),
(45, '0', 4308211020327, '2016-01-11 23:10:58', 100, '45', 0, '注册成功赠送'),
(46, '0', 4308211020331, '2016-01-11 23:52:53', 100, '45', 0, '注册成功赠送'),
(47, '0', 4308211020332, '2016-01-12 12:24:15', 100, '45', 0, '注册成功赠送'),
(48, '0', 4308211020333, '2016-01-12 14:51:28', 100, '45', 0, '注册成功赠送'),
(49, '0', 4308211020334, '2016-01-12 14:54:05', 100, '45', 0, '注册成功赠送'),
(50, '0', 4308211020335, '2016-01-12 15:33:42', 100, '45', 0, '注册成功赠送'),
(51, '0', 4308211020336, '2016-01-12 22:55:16', 100, '45', 0, '注册成功赠送'),
(52, '0', 4308211020337, '2016-01-13 10:58:30', 100, '45', 0, '注册成功赠送'),
(53, '0', 4308211020338, '2016-01-13 14:03:15', 100, '45', 0, '注册成功赠送'),
(65, '0', 4308211020346, '2016-01-17 19:45:04', 100, '45', 0, '注册成功赠送'),
(66, '0', 4308211020347, '2016-01-17 20:22:16', 100, '45', 0, '注册成功赠送'),
(67, '0', 4308211020348, '2016-01-18 12:58:18', 100, '45', 0, '注册成功赠送'),
(68, '0', 4308211020349, '2016-01-18 13:10:22', 100, '45', 0, '注册成功赠送'),
(69, '0', 4308211020350, '2016-01-22 16:20:47', 100, '45', 0, '注册成功赠送'),
(70, '0', 4308211020351, '2016-01-29 00:35:54', 100, '45', 0, '注册成功赠送'),
(71, '0', 4308211020352, '2016-02-01 18:26:42', 100, '45', 0, '注册成功赠送'),
(72, '0', 4308211020352, '2016-02-01 18:59:31', 100, '62', 153, '幸运币兑换'),
(73, '0', 4308211020353, '2016-02-05 15:25:09', 100, '45', 0, '注册成功赠送'),
(74, '0', 4308211020354, '2016-02-06 15:31:31', 100, '45', 0, '注册成功赠送'),
(75, '0', 4308211020355, '2016-02-13 11:03:33', 100, '45', 0, '注册成功赠送'),
(76, '0', 4308211020356, '2016-02-13 19:36:03', 100, '45', 0, '注册成功赠送'),
(77, '0', 4308211020357, '2016-02-20 22:38:36', 100, '45', 0, '注册成功赠送'),
(78, '0', 4308211020358, '2016-02-21 03:05:09', 100, '45', 0, '注册成功赠送'),
(79, '0', 4308211020359, '2016-02-23 11:33:32', 100, '45', 0, '注册成功赠送'),
(80, '0', 4308211020360, '2016-02-25 22:18:02', 100, '45', 0, '注册成功赠送'),
(81, '0', 4308211020361, '2016-03-04 16:48:00', 100, '45', 0, '注册成功赠送'),
(82, '0', 4308211020362, '2016-03-08 13:28:42', 100, '45', 0, '注册成功赠送'),
(83, '0', 4308211020363, '2016-03-10 14:25:27', 100, '45', 0, '注册成功赠送'),
(84, '0', 4308211020364, '2016-05-17 13:38:06', 100, '45', 0, '注册成功赠送'),
(85, '0', 4308211020365, '2016-06-10 14:05:36', 100, '45', 0, '注册成功赠送'),
(86, '0', 4308211020366, '2016-06-19 20:34:33', 100, '45', 0, '注册成功赠送'),
(87, '0', 4308211020367, '2016-06-22 16:36:44', 100, '45', 0, '注册成功赠送'),
(88, '0', 4308211020368, '2016-06-28 10:16:59', 100, '45', 0, '注册成功赠送'),
(89, '0', 4308211020369, '2016-07-09 22:26:42', 100, '45', 0, '注册成功赠送'),
(90, '0', 4308211020370, '2016-07-10 17:03:18', 100, '45', 0, '注册成功赠送'),
(91, '0', 4308211020371, '2016-07-25 01:43:42', 100, '45', 0, '注册成功赠送'),
(92, '0', 4308211020372, '2016-08-01 09:55:47', 100, '45', 0, '注册成功赠送'),
(93, '0', 4308211020373, '2016-08-10 00:41:34', 100, '45', 0, '注册成功赠送'),
(94, '0', 4308211020374, '2016-09-18 10:46:20', 100, '45', 0, '注册成功赠送'),
(95, '0', 4308211020375, '2016-09-18 22:13:52', 100, '45', 0, '注册成功赠送'),
(96, '0', 4308211020376, '2016-09-20 11:27:15', 100, '45', 0, '注册成功赠送');

--
-- 触发器 `zjr_game_coin_trans`
--
DELIMITER $$
CREATE TRIGGER `update_game_coin` AFTER INSERT ON `zjr_game_coin_trans` FOR EACH ROW begin
  update zjr_coin_balance set GameBal=GameBal+new.TransAmt where UserId=new.UserId;
end
$$
DELIMITER ;
