feat: 完成平台发表情况查询

This commit is contained in:
augushong
2025-05-05 11:33:00 +08:00
parent bf2af3a4b7
commit 81e079c8f9
3 changed files with 68 additions and 5 deletions

View File

@@ -24,6 +24,11 @@ class Post extends Base
public const CACHE_KEY_HITS = 'cache_hits_';
public const LIST_POST_PLATFORM_STATUS = [
0 => '未发表',
1 => '已发表',
];
public static $autoClearCache = [
];
@@ -265,12 +270,13 @@ class Post extends Base
return $value;
}
public function getPostPlatformDataArrayAttr()
public function getPostPlatformDataArrayAttr()
{
$data = $this->getData('post_platform_data');
if (empty($data)) {
return [];
}
return json_decode($data, true);
}
}