oa接口增加折扣discoutn_amount 平台币抵扣时折扣失效

master
tping 3 years ago
parent 01a37f9067
commit 629c1c2fd9

@ -145,7 +145,7 @@ class FengHuoApi2Controller extends GetInfoBaseController{
$where['is_check'] = 1; $where['is_check'] = 1;
$data = M('spend','tab_') $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) ->where($where)
->order($order) ->order($order)
->page($page, $row) ->page($page, $row)

@ -1203,6 +1203,15 @@ class PayH5Controller extends BaseController{
$request['pay_way'] = 0; $request['pay_way'] = 0;
$request['spend_ip'] = get_client_ip(); $request['spend_ip'] = get_client_ip();
$user_entity = get_user_entity($request['user_id']); $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 = get_discount($request['game_id'], $request['user_id']);
$discount = $discount['discount']; $discount = $discount['discount'];
$discountAmount = 0; $discountAmount = 0;

Loading…
Cancel
Save