1, 平台币补单

2,repair_pay表
master
tping 5 years ago
parent 6cd566e152
commit 964eea79e5

@ -166,6 +166,17 @@ class RepairController extends ThinkController {
M($tab, 'tab_')->commit();
}
} else { // deposit
$user = M("user","tab_");
$r = $user->where("id=".$order['user_id'])->setInc("balance", $order['pay_amount']);
if ($r === false) {
M($tab, 'tab_')->rollback();
$this->ajaxReturn(array('status'=>1,'msg'=>'数据有误.'));
}
$r = $user->where("id=".$order['user_id'])->setInc("cumulative", $order['pay_amount']);
if ($r === false) {
M($tab, 'tab_')->rollback();
$this->ajaxReturn(array('status'=>1,'msg'=>'数据有误..'));
}
M('spend', 'tab_')->commit();
}

@ -894,3 +894,16 @@ ADD COLUMN `event_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '事件是否通
-- 菜单添加补单记录
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('补单记录管理', 137, 0, 'BehaviorLog/singleSupplement', 0, '', '游戏订单', 0, 1);
-- 增加通知到账 tping
CREATE TABLE `tab_repair_pay` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`admin_id` int(11) NOT NULL DEFAULT '0',
`admin_name` varchar(255) NOT NULL DEFAULT '',
`pay_order_number` varchar(255) NOT NULL DEFAULT '',
`ip` varchar(255) NOT NULL DEFAULT '',
`tab` varchar(255) NOT NULL DEFAULT '' COMMENT '订单表spend,deposit',
`create_time` int(11) NOT NULL DEFAULT '0',
`type` int(11) DEFAULT '0' COMMENT '0通知到账 1补单记录',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='通知到账补单';
Loading…
Cancel
Save