私域操盘手 - 微信号列表计算今日新增好友数量补充业务逻辑

This commit is contained in:
柳清爽
2025-05-10 11:19:51 +08:00
parent 24fc116d9b
commit 6d9d56008d

View File

@@ -29,14 +29,21 @@ class GetWechatsOnDevicesV1Controller extends BaseController
} }
/** /**
* TODO 计算今日新增好友数量 * 计算今日新增好友数量
* *
* @param string $wechatId * @param string $ownerWechatId
* @return int * @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('*');
} }
/** /**