Commit 70e61b06 authored by suntengda's avatar suntengda

update app拼单活动详情增加生活号注册天数

parent 6b9b5ac4
......@@ -950,6 +950,16 @@ class MarketingService
return $info;
}
/**
* 获取生活号加入生活圈天数
* @param $createTime
* @return false|float
*/
private static function countAccountRegisterDays($createTime)
{
return ceil((time() - strtotime($createTime)) / 86400);
}
/**
* 拼单活动详情
* @param $params
......@@ -980,7 +990,9 @@ class MarketingService
if (!empty($lifeAccountList[$pindanMarketing["publish_life_account_id"]])) {
$marketingData["life_account_name"] = $lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_name"];
$marketingData["life_account_icon"] = $lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_icon"];
$marketingData["life_account_register_days"] = self::countAccountRegisterDays($lifeAccountList[$pindanMarketing["publish_life_account_id"]]['create_time']);
}
$marketingData["id"] = $marketingInfo["marketing_id"];
$marketingData["marketing_name"] = $marketingInfo["marketing_name"];
$marketingData["good_count"] = $marketingInfo["good_count"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment