@ -145,7 +145,7 @@ class FengHuoApi2Controller extends GetInfoBaseController{
$where['is_check'] = 1;
$data = M('spend','tab_')
->field('pay_order_number,promote_account,user_id,game_name,game_player_name,server_name,pay_time,cost,user_account')
->field('pay_order_number,promote_account,user_id,game_name,game_player_name,server_name,pay_time,cost,user_account,discount_amount')
->where($where)
->order($order)
->page($page, $row)
@ -1203,6 +1203,15 @@ class PayH5Controller extends BaseController{
$request['pay_way'] = 0;
$request['spend_ip'] = get_client_ip();
$user_entity = get_user_entity($request['user_id']);
$spend = M('spend','tab_')->where(['pay_order_number' => $request['order_id']])->find();
if ($spend) {
if ($spend['discount_amount'] > 0) {
$discountInfo = discountInfo($request['game_id']);
if (!$discountInfo) {
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>urlencode('折扣无效,请重试!'), 'user_token' => $this->userToken)));exit;
}
$discount = get_discount($request['game_id'], $request['user_id']);
$discount = $discount['discount'];
$discountAmount = 0;