update 用户邀请数据

This commit is contained in:
chenbo 2024-01-12 13:50:48 +08:00
parent 363ec01a24
commit 21030d98dc
2 changed files with 10 additions and 4 deletions

View File

@ -121,6 +121,7 @@ class UserLogic extends BaseLogic
'register_num' => $params['register_num'], 'register_num' => $params['register_num'],
'merchant_num' => $params['merchant_num'], 'merchant_num' => $params['merchant_num'],
'trade_amount' => $params['trade_amount'], 'trade_amount' => $params['trade_amount'],
'update_time' => time()
]); ]);
} }

View File

@ -95,10 +95,15 @@ class UserLogic extends BaseLogic
$name=DictData::where('id',$data['company']['company_type'])->value('name'); $name=DictData::where('id',$data['company']['company_type'])->value('name');
$data['company']['company_type_name']=$name; $data['company']['company_type_name']=$name;
} }
$inviteUserStatistics = ShopRequestLogic::getInviteUserInfo(['promotion_code' => $data['invite_code']]); if (date('Y-m-d', strtotime($data['update_time'])) == date('Y-m-d', time())) {
$data['register_num'] = $inviteUserStatistics['data']['user_count'];
$data['merchant_num'] = $inviteUserStatistics['data']['merchant_count']; } else {
$data['trade_amount'] = $inviteUserStatistics['data']['trade_amount']; $inviteUserStatistics = ShopRequestLogic::getInviteUserInfo(['promotion_code' => $data['invite_code']]);
$data['register_num'] = $inviteUserStatistics['data']['user_count'];
$data['merchant_num'] = $inviteUserStatistics['data']['merchant_count'];
$data['trade_amount'] = $inviteUserStatistics['data']['trade_amount'];
}
return $data ; return $data ;
} }