feat(followup-audio): confirm role corrections and reextract cached transcripts
This commit is contained in:
@@ -12,6 +12,7 @@ use app\common\service\followupaudio\FollowupAudioProviderConfig as ProviderConf
|
||||
use app\common\service\followupaudio\FollowupAudioStore as Store;
|
||||
use app\common\service\followupaudio\FollowupAudioUpload as Upload;
|
||||
use DomainException;
|
||||
use app\common\service\followupaudio\FollowupAudioReextract as Reextract;
|
||||
|
||||
final class FollowupAudioLogic
|
||||
{
|
||||
@@ -110,7 +111,16 @@ final class FollowupAudioLogic
|
||||
$reason = !Store::enabled() ? '回访录音功能尚未启用'
|
||||
: ((int) $info['root'] !== 1 && (int) $task['actor_id'] !== $actor
|
||||
? '仅上传者或超级管理员可删除录音' : Store::deleteBlockReason($task));
|
||||
return $summary + ['can_delete' => $reason === '', 'delete_block_reason' => $reason];
|
||||
$reextractReason = (int) $info['root'] !== 1 && (int) $task['actor_id'] !== $actor
|
||||
? '仅上传者或超级管理员可重新提炼' : Reextract::blockReason($task);
|
||||
return $summary + ['can_delete' => $reason === '', 'delete_block_reason' => $reason,
|
||||
'can_reextract' => $reextractReason === '', 'reextract_block_reason' => $reextractReason];
|
||||
}
|
||||
|
||||
public static function reextract(int $id, int $version, $roles, int $actor, array $info): array
|
||||
{
|
||||
self::requireEnabled(true);
|
||||
return self::protectDetail(Reextract::queue($id, $version, $roles, $actor, $info), $actor, $info);
|
||||
}
|
||||
|
||||
public static function retry(int $id, int $actor, array $info): array
|
||||
|
||||
Reference in New Issue
Block a user