存客宝应用接口初始化

This commit is contained in:
Ghost
2026-01-05 10:25:32 +08:00
parent fa37227954
commit 02797ba50a
414 changed files with 85530 additions and 75 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace AccountWeight;
use library\Interfaces\WechatAccountWeightAssessment as WechatAccountWeightAssessmentInterface;
use library\Interfaces\WechatFriendAddLimitAssessment as WechatFriendAddLimitAssessmentInterface;
class WechatFriendAddLimitAssessment implements WechatFriendAddLimitAssessmentInterface
{
/**
* @inheritDoc
*/
public function maxLimit(WechatAccountWeightAssessmentInterface $weight): int
{
$adjusted = $scope = $weight->getWeightScope();
$lastDigit = $scope % 10;
if ($scope < 10) {
$adjusted = $lastDigit < 5 ? 5 : 10;
}
// 每5权重=1好友最多20个
return min(20, floor($adjusted / 5));
}
}