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'],
'merchant_num' => $params['merchant_num'],
'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');
$data['company']['company_type_name']=$name;
}
if (date('Y-m-d', strtotime($data['update_time'])) == date('Y-m-d', time())) {
} else {
$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 ;
}