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
834 B
PHP
37 lines
834 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace app\api\model;
|
|
|
|
use think\Model;
|
|
|
|
/**
|
|
* 用户特殊绑定额度模型(对应 dy_special_binding 表)
|
|
*
|
|
* 该表用于补充用户级绑定上限、公众号绑定数等特殊能力。
|
|
*/
|
|
class DySpecialBinding extends Model
|
|
{
|
|
// 与 acgpmw 保持一致,特殊绑定配置存放在 member 库。
|
|
protected $connection = 'dbmember';
|
|
|
|
protected $name = 'dy_special_binding';
|
|
|
|
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();
|
|
}
|
|
}
|