|
|
|
@ -1080,14 +1080,14 @@ ADD COLUMN `pay_url` text NULL AFTER `check_sign`;
|
|
|
|
|
$user_play->where($user_play_map)->save(array('bind_balance' => 0)); // 扣绑定币
|
|
|
|
|
$request['price'] = $user_play_data['bind_balance'];
|
|
|
|
|
$result = $this->add_spend($request);
|
|
|
|
|
$valueDetailLogModel->add($request['user_id'], $user_play_data['bind_balance'], -$user_play_data['bind_balance'], 0, $valueDetailLogModel::BANDBI, "绑定币消费:".$user_play_data['pay_amount']);
|
|
|
|
|
$valueDetailLogModel->addLog($request['user_id'], $request['pay_order_number'], $user_play_data['bind_balance'], -$user_play_data['bind_balance'], 0, $valueDetailLogModel::BANDBI, "绑定币消费:".$user_play_data['pay_amount']);
|
|
|
|
|
$this->set_ratio($request['pay_order_number'], 2); // 游戏返利
|
|
|
|
|
$notice_order[] = $request['pay_order_number'];
|
|
|
|
|
}
|
|
|
|
|
$request['pay_order_number'] = $pay_order_number;
|
|
|
|
|
$request['pay_way'] = 0; // 扣平台币
|
|
|
|
|
$real_price = $price - $user_play_data['bind_balance'];
|
|
|
|
|
$valueDetailLogModel->add($request['user_id'], $balance, -$real_price, 0, $valueDetailLogModel::BALANCE, "平台币消费:".$real_price);
|
|
|
|
|
$valueDetailLogModel->addLog($request['user_id'], $request['pay_order_number'], $balance, -$real_price, 0, $valueDetailLogModel::BALANCE, "平台币消费:".$real_price);
|
|
|
|
|
$user->where(array('id' => $request["user_id"]))->setDec("balance", $real_price);
|
|
|
|
|
//$this->set_message(0,"fail", $request['pay_order_number']);
|
|
|
|
|
|
|
|
|
@ -1096,7 +1096,7 @@ ADD COLUMN `pay_url` text NULL AFTER `check_sign`;
|
|
|
|
|
$this->set_ratio($request['pay_order_number'], 1); // 游戏返利
|
|
|
|
|
$notice_order[] = $request['pay_order_number'];
|
|
|
|
|
} else { // 绑定币足够扣
|
|
|
|
|
$valueDetailLogModel->add($request['user_id'], $user_play_data['bind_balance'], -$request['price'], $user_play_data['bind_balance'] - $request['price'], $valueDetailLogModel::BANDBI, "绑定币消费.:".$request['price']);
|
|
|
|
|
$valueDetailLogModel->addLog($request['user_id'], $request['pay_order_number'], $user_play_data['bind_balance'], -$request['price'], $user_play_data['bind_balance'] - $request['price'], $valueDetailLogModel::BANDBI, "绑定币消费.:".$request['price']);
|
|
|
|
|
|
|
|
|
|
$user_play->where($user_play_map)->setDec('bind_balance', $request['price']); // 扣绑定币
|
|
|
|
|
$result = $this->add_spend($request);
|
|
|
|
|