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:
@@ -0,0 +1,36 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user