私域操盘手 - 微信号列表计算今日新增好友数量补充业务逻辑
This commit is contained in:
@@ -29,14 +29,21 @@ class GetWechatsOnDevicesV1Controller extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 计算今日新增好友数量
|
||||
* 计算今日新增好友数量
|
||||
*
|
||||
* @param string $wechatId
|
||||
* @param string $ownerWechatId
|
||||
* @return int
|
||||
*/
|
||||
protected function getTodayNewFriendCount(string $wechatId): int
|
||||
protected function getTodayNewFriendCount(string $ownerWechatId): int
|
||||
{
|
||||
return 0;
|
||||
return WechatFriendModel::where( compact('ownerWechatId') )
|
||||
->whereBetween('createTime',
|
||||
[
|
||||
strtotime(date('Y-m-d 00:00:00')),
|
||||
strtotime(date('Y-m-d 23:59:59'))
|
||||
]
|
||||
)
|
||||
->count('*');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user