feat(member): enhance product info processing and add new utility methods

- Updated `getProductInfo` method to return processed product information using `buildEffectiveProductInfo`.
- Introduced new private methods for building effective product info, resolving software account levels, and checking special TikTok account status.
- Refactored platform string handling with `appendPlatform` method to ensure unique and sorted platform entries.
- Updated platform name mappings in `PlatformService` for consistency with new naming conventions.
This commit is contained in:
nepiedg
2026-04-02 10:43:25 +00:00
parent 044586d60a
commit 5a9d6090f3
5 changed files with 246 additions and 9 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace app\api\model;
use think\Model;
/**
* 用户单独平台权限模型(对应 dy_special_platforms 表)
*
* 该表用于覆盖套餐默认平台集合,并补充少量用户级能力开关。
*/
class DySpecialPlatforms extends Model
{
// 与 acgpmw 保持一致,特殊平台权限存放在 member 库。
protected $connection = 'dbmember';
protected $name = 'dy_special_platforms';
protected $pk = 'id';
protected $autoWriteTimestamp = false;
/**
* 获取当前用户启用中的特殊平台配置。
*
* @param int $userid 用户ID
* @return self|null
*/
public static function findActiveByUserid(int $userid): ?self
{
return self::where('userid', $userid)
->where('disabled', 0)
->find();
}
}