|
@@ -1025,7 +1025,7 @@ class MemberService
|
|
} else {
|
|
} else {
|
|
$item['balance_type'] = 'cut';
|
|
$item['balance_type'] = 'cut';
|
|
}
|
|
}
|
|
- if ($key == 0 && in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE', 'PARTNER', 'COMBINE'])) {
|
|
|
|
|
|
+ if ($key == 0 && in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE'])) {
|
|
if (!empty($item['pay_extend_json']) && !in_array($item['join_pay_order_id'],['PARTNER', 'COMBINE'])) {
|
|
if (!empty($item['pay_extend_json']) && !in_array($item['join_pay_order_id'],['PARTNER', 'COMBINE'])) {
|
|
$extendJson = json_decode($item['pay_extend_json'], true);
|
|
$extendJson = json_decode($item['pay_extend_json'], true);
|
|
if (!isset($extendJson['added_amount'])) {
|
|
if (!isset($extendJson['added_amount'])) {
|
|
@@ -1076,7 +1076,7 @@ class MemberService
|
|
}
|
|
}
|
|
|
|
|
|
if (in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE', 'PARTNER', 'COMBINE', 'IN'])) {
|
|
if (in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE', 'PARTNER', 'COMBINE', 'IN'])) {
|
|
- if (!empty($item['pay_extend_json'])) {
|
|
|
|
|
|
+ if (!empty($item['pay_extend_json']) && !in_array($item['join_pay_order_id'],['PARTNER', 'COMBINE'])) {
|
|
$extendJson = json_decode($item['pay_extend_json'], true);
|
|
$extendJson = json_decode($item['pay_extend_json'], true);
|
|
if (isset($extendJson['added_amount']) && floatval($extendJson['added_amount']) > 0) {
|
|
if (isset($extendJson['added_amount']) && floatval($extendJson['added_amount']) > 0) {
|
|
$data[] = [
|
|
$data[] = [
|
|
@@ -1090,6 +1090,24 @@ class MemberService
|
|
$balance = $balance - $extendJson['added_amount'];
|
|
$balance = $balance - $extendJson['added_amount'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (in_array($item['join_pay_order_id'],['PARTNER', 'COMBINE'])){
|
|
|
|
+ $addedAmount = 0;
|
|
|
|
+ if (!isset($payObjectJson['recharge_config'])) {
|
|
|
|
+ $addedAmount = 0;
|
|
|
|
+ }
|
|
|
|
+ if (isset($payObjectJson['recharge_config']) && !empty($payObjectJson['recharge_config']['nbr']) && floatval($payObjectJson['recharge_config']['nbr'] > 0)) {
|
|
|
|
+ $addedAmount = $payObjectJson['recharge_config']['nbr'];
|
|
|
|
+ $data[] = [
|
|
|
|
+ 'join_pay_member_id' => $item['join_pay_member_id'],
|
|
|
|
+ 'pay_addtimes' => $item['pay_addtimes'],
|
|
|
|
+ 'pay_amount' => $addedAmount,
|
|
|
|
+ 'pay_category' => 'ADDED',
|
|
|
|
+ 'balance' => number_format($balance, 2, '.', ''),
|
|
|
|
+ 'balance_type' => 'add',
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ $balance = $balance - $addedAmount;
|
|
|
|
+ }
|
|
$item['balance'] = number_format($balance, 2, '.', '');
|
|
$item['balance'] = number_format($balance, 2, '.', '');
|
|
$balance = $balance - $item['pay_amount'];
|
|
$balance = $balance - $item['pay_amount'];
|
|
} else {
|
|
} else {
|