|
@@ -286,8 +286,8 @@ class AwardIntegralServices extends BaseServices
|
|
|
$num = $origin['extract_num'];
|
|
$num = $origin['extract_num'];
|
|
|
}
|
|
}
|
|
|
if ($num <= 0) return true;
|
|
if ($num <= 0) return true;
|
|
|
- $update['extract_num'] = bcsub($origin['extract_num'], (string)$num, 2);
|
|
|
|
|
- $update['extracted_num'] = bcadd($origin['extracted_num'], (string)$num, 2);
|
|
|
|
|
|
|
+ $update['extract_num'] = bcsub((string)$origin['extract_num'], (string)$num, 2);
|
|
|
|
|
+ $update['extracted_num'] = bcadd((string)$origin['extracted_num'], (string)$num, 2);
|
|
|
$this->update($id, $update);
|
|
$this->update($id, $update);
|
|
|
$res = true;
|
|
$res = true;
|
|
|
/** @var UserBrokerageServices $brokerageService */
|
|
/** @var UserBrokerageServices $brokerageService */
|
|
@@ -305,7 +305,7 @@ class AwardIntegralServices extends BaseServices
|
|
|
$mark = '用户参考分' . $system ? '出局' : '提取' . $num;
|
|
$mark = '用户参考分' . $system ? '出局' : '提取' . $num;
|
|
|
$to_integral = bcdiv(bcmul((string)$num, (string)$to_integral), '100', 2);
|
|
$to_integral = bcdiv(bcmul((string)$num, (string)$to_integral), '100', 2);
|
|
|
if ($to_integral > 0) {
|
|
if ($to_integral > 0) {
|
|
|
- $balance = bcadd($user['integral'], (string)$to_integral, 2);
|
|
|
|
|
|
|
+ $balance = bcadd((string)$user['integral'], (string)$to_integral, 2);
|
|
|
$res = $res && $billService->income('extract_integral_shop', $uid, [
|
|
$res = $res && $billService->income('extract_integral_shop', $uid, [
|
|
|
'mark' => $mark,
|
|
'mark' => $mark,
|
|
|
'number' => floatval($to_integral),
|
|
'number' => floatval($to_integral),
|
|
@@ -317,9 +317,9 @@ class AwardIntegralServices extends BaseServices
|
|
|
$left = bcsub((string)$num, (string)$to_integral, 2);
|
|
$left = bcsub((string)$num, (string)$to_integral, 2);
|
|
|
if ($reorder_set > $origin['reorder_count']) {
|
|
if ($reorder_set > $origin['reorder_count']) {
|
|
|
$to_now_money = sys_config('re_now_money');
|
|
$to_now_money = sys_config('re_now_money');
|
|
|
- $to_now_money = bcdiv(bcmul($left, (string)$to_now_money), '100', 2);
|
|
|
|
|
|
|
+ $to_now_money = bcdiv(bcmul((string)$left, (string)$to_now_money), '100', 2);
|
|
|
if ($to_now_money > 0) {
|
|
if ($to_now_money > 0) {
|
|
|
- $balance = bcadd($user['now_money'], $to_now_money, 2);
|
|
|
|
|
|
|
+ $balance = bcadd((string)$user['now_money'], (string)$to_now_money, 2);
|
|
|
$res = $res && $moneyService->income('extract_integral_static', $uid, [
|
|
$res = $res && $moneyService->income('extract_integral_static', $uid, [
|
|
|
'mark' => $mark,
|
|
'mark' => $mark,
|
|
|
'number' => floatval($to_now_money),
|
|
'number' => floatval($to_now_money),
|
|
@@ -330,7 +330,7 @@ class AwardIntegralServices extends BaseServices
|
|
|
$to_energy = sys_config('re_energy');
|
|
$to_energy = sys_config('re_energy');
|
|
|
$to_energy = bcdiv(bcmul((string)$left, (string)$to_energy), '100', 2);
|
|
$to_energy = bcdiv(bcmul((string)$left, (string)$to_energy), '100', 2);
|
|
|
if ($to_energy > 0) {
|
|
if ($to_energy > 0) {
|
|
|
- $balance = bcadd($user['energy'], $to_energy, 2);
|
|
|
|
|
|
|
+ $balance = bcadd((string)$user['energy'], (string)$to_energy, 2);
|
|
|
$res = $res && $billService->income('extract_integral_static', $uid, [
|
|
$res = $res && $billService->income('extract_integral_static', $uid, [
|
|
|
'mark' => $mark,
|
|
'mark' => $mark,
|
|
|
'number' => floatval($to_energy),
|
|
'number' => floatval($to_energy),
|
|
@@ -342,7 +342,7 @@ class AwardIntegralServices extends BaseServices
|
|
|
if ($to_brokerage < 0) $to_brokerage = 0;
|
|
if ($to_brokerage < 0) $to_brokerage = 0;
|
|
|
$to_brokerage = bcdiv(bcmul((string)$left, (string)$to_brokerage), '100', 2);
|
|
$to_brokerage = bcdiv(bcmul((string)$left, (string)$to_brokerage), '100', 2);
|
|
|
if ($to_brokerage > 0) {
|
|
if ($to_brokerage > 0) {
|
|
|
- $balance = bcadd($user['brokerage_price'], $to_brokerage, 2);
|
|
|
|
|
|
|
+ $balance = bcadd((string)$user['brokerage_price'], (string)$to_brokerage, 2);
|
|
|
$res = $res && $brokerageService->income('extract_integral_static', $uid, [
|
|
$res = $res && $brokerageService->income('extract_integral_static', $uid, [
|
|
|
'mark' => $mark,
|
|
'mark' => $mark,
|
|
|
'number' => floatval($to_energy),
|
|
'number' => floatval($to_energy),
|
|
@@ -352,7 +352,7 @@ class AwardIntegralServices extends BaseServices
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
//消费分,佣金
|
|
//消费分,佣金
|
|
|
- $balance = bcadd($user['brokerage_price'], $left, 2);
|
|
|
|
|
|
|
+ $balance = bcadd((string)$user['brokerage_price'], (string)$left, 2);
|
|
|
$res = $res && $brokerageService->income('extract_integral_static', $uid, [
|
|
$res = $res && $brokerageService->income('extract_integral_static', $uid, [
|
|
|
'mark' => $mark,
|
|
'mark' => $mark,
|
|
|
'number' => floatval($left),
|
|
'number' => floatval($left),
|