|
@@ -257,7 +257,6 @@ class MemberService
|
|
|
return json_success('', compact('rows', 'page', 'pageSize', 'total'));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public static function exportMember(Request $request)
|
|
|
{
|
|
|
$memberIds = $request->get('member_id', '');
|
|
@@ -1111,12 +1110,12 @@ class MemberService
|
|
|
} else if (mb_substr($item['goods_category'], 0, 7) == '会员合伙人产品') {
|
|
|
$item['goods_category'] = '会员合伙人充值';
|
|
|
}
|
|
|
- if (in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE','CROWN_CONTINUE', 'PARTNER', 'IN'])) {
|
|
|
+ if (in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE', 'CROWN_CONTINUE', 'PARTNER', 'IN'])) {
|
|
|
$item['balance_type'] = 'add';
|
|
|
} else {
|
|
|
$item['balance_type'] = 'cut';
|
|
|
}
|
|
|
- if ($key == 0 && in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE','CROWN_CONTINUE'])) {
|
|
|
+ if ($key == 0 && in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE', 'CROWN_CONTINUE'])) {
|
|
|
if (!empty($item['pay_extend_json']) && !in_array($item['join_pay_order_id'], ['PARTNER', 'COMBINE'])) {
|
|
|
$extendJson = json_decode($item['pay_extend_json'], true);
|
|
|
if (!isset($extendJson['added_amount'])) {
|
|
@@ -1128,9 +1127,9 @@ class MemberService
|
|
|
// }
|
|
|
if (isset($extendJson['added_amount']) && floatval($extendJson['added_amount']) > 0) {
|
|
|
$payCategory = 'ADDED';
|
|
|
- if ($item['pay_category'] == 'GIVE'){
|
|
|
+ if ($item['pay_category'] == 'GIVE') {
|
|
|
$payCategory = 'GIVE';
|
|
|
- }elseif ($item['pay_category'] == 'CROWN_CONTINUE'){
|
|
|
+ } elseif ($item['pay_category'] == 'CROWN_CONTINUE') {
|
|
|
$payCategory = 'CROWN_CONTINUE';
|
|
|
}
|
|
|
$data[] = [
|
|
@@ -1165,21 +1164,21 @@ class MemberService
|
|
|
|
|
|
$item['balance'] = number_format($balance, 2, '.', '');
|
|
|
$balance = $balance - $item['pay_amount'];
|
|
|
- if (!in_array($item['pay_category'],['GIVE','CROWN_CONTINUE']) ) {
|
|
|
+ if (!in_array($item['pay_category'], ['GIVE', 'CROWN_CONTINUE'])) {
|
|
|
$data[] = $item;
|
|
|
}
|
|
|
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if (in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE','CROWN_CONTINUE', 'PARTNER', 'COMBINE', 'IN'])) {
|
|
|
+ if (in_array($item['pay_category'], ['RECHARGE', 'REFUND', 'GIVE', 'CROWN_CONTINUE', 'PARTNER', 'COMBINE', 'IN'])) {
|
|
|
if (!empty($item['pay_extend_json']) && !in_array($item['join_pay_order_id'], ['PARTNER', 'COMBINE'])) {
|
|
|
$extendJson = json_decode($item['pay_extend_json'], true);
|
|
|
if (isset($extendJson['added_amount']) && floatval($extendJson['added_amount']) > 0) {
|
|
|
$payCategory = 'ADDED';
|
|
|
- if ($item['pay_category'] == 'GIVE'){
|
|
|
+ if ($item['pay_category'] == 'GIVE') {
|
|
|
$payCategory = 'GIVE';
|
|
|
- }elseif ($item['pay_category'] == 'CROWN_CONTINUE'){
|
|
|
+ } elseif ($item['pay_category'] == 'CROWN_CONTINUE') {
|
|
|
$payCategory = 'CROWN_CONTINUE';
|
|
|
}
|
|
|
$data[] = [
|
|
@@ -1218,7 +1217,7 @@ class MemberService
|
|
|
$balance = $balance + $item['pay_amount'];
|
|
|
}
|
|
|
|
|
|
- if (!in_array($item['pay_category'],['GIVE','CROWN_CONTINUE']) ) {
|
|
|
+ if (!in_array($item['pay_category'], ['GIVE', 'CROWN_CONTINUE'])) {
|
|
|
$data[] = $item;
|
|
|
}
|
|
|
}
|
|
@@ -1916,7 +1915,7 @@ class MemberService
|
|
|
{
|
|
|
$members = Member::where('join_member_role_id', '<>', '')->get()->toArray();
|
|
|
foreach ($members as $member) {
|
|
|
- if (empty($member['member_role_begintime'])){
|
|
|
+ if (empty($member['member_role_begintime'])) {
|
|
|
continue;
|
|
|
}
|
|
|
$endDateTime = date('Y-m-d 23:59:59', strtotime($member['member_role_begintime'] . ' +364 days'));
|
|
@@ -1926,7 +1925,7 @@ class MemberService
|
|
|
$memberUpdate = [
|
|
|
'join_member_role_id' => '',
|
|
|
'member_role_begintime' => '',
|
|
|
- 'member_role_config_json'=>'[]'
|
|
|
+ 'member_role_config_json' => '[]'
|
|
|
];
|
|
|
if (!empty($member['member_role_config_json'])) {
|
|
|
$roleConfigJson = json_decode($member['member_role_config_json'], true);
|