5a9d6090f3
- 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.
37 lines
846 B
PHP
37 lines
846 B
PHP
<?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();
|
|
}
|
|
}
|