chore(清理): 删除死代码与过期文件——7个无引用DTO+图片工作台整棵子树(16文件)+冗余副本+一次性脚本+可再生审计快照

每项删除前均做过全仓库引用核对(含 tests/、两个前端、Python 侧):
- Java 7 个 DTO:BrandTaskRunRequest、LegacyBrandTaskCreateVo、Ziniao{SwitchShopRequest,CurrentShopVo,LoginUrlVo,SwitchShopVo}、
  AppearancePatentParsedGroupManifestDto —— 全仓库仅命中声明行本身
- frontend-vue 整棵 src/pages/image/(16 文件):9a487ae9 起首页一级入口已删("图片已并入视频页"),
  该子树完全自闭环;同步移除 /image 路由与 ImageVideoPage 的图片入口
- frontend-vue 两个孤儿组件 AiModuleSwitch/AiWorkflowShell:无引用,且位于 src/shared/components
  而非 unplugin-vue-components 默认扫描的 src/components,不存在自动注册
- backend/tool/devices.py + .device_id:app_client/tool/devices.py 的冗余副本(活的是 app_client 那份),
  app.py 只注册 version_bp,无任何引用
- admin-frontend-vue 的一次性 Playwright 调试脚本 rescan.tmp.mjs / diag-role-price.mjs
- backend-java/scripts/*_report.json ×4:可由 n1_scan.py 等重跑的审计快照
- frontend-vue/DESIGN.md:Last refreshed 2026-06-09,仍是 MPA 时代内容
- backend/requirement.txt:pip freeze 63 条裁剪为实际 import 的 5 条;run.sh 硬依赖该文件存在,故保留文件本身

验证:mvn compile 通过、vue-tsc --noEmit 通过、残留引用 grep 零命中。
注:仓库既有的 4 个失败测试类(FlywayMigration*DocTest、MigrationInventoryTest、HttpClientTimeoutEffectiveTest)
经 stash 对照实验确认与本次改动无关(相同 Failures/Errors 计数)。
This commit is contained in:
2026-09-11 01:33:54 +08:00
parent 48ee76d60d
commit dd45ffe34c
37 changed files with 11 additions and 11972 deletions
-42
View File
@@ -1,42 +0,0 @@
import { chromium } from '@playwright/test'
const browser = await chromium.launch({ channel: 'msedge', headless: true })
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } })
const errors = []
page.on('pageerror', (e) => errors.push('pageerror: ' + e.message))
page.on('console', (m) => { if (m.type() === 'error') errors.push('console: ' + m.text().slice(0, 200)) })
const userReqs = []
page.on('request', (r) => { if (r.url().includes('/api/admin/users')) userReqs.push(r.url()) })
await page.goto('http://localhost:5174/admin-vue/', { waitUntil: 'networkidle' })
await page.waitForTimeout(800)
if (await page.locator('#loginUsername').isVisible().catch(() => false)) {
await page.locator('#loginUsername').fill('admin')
await page.locator('#loginPassword').fill('admin123')
await page.locator('.btn-login').click()
await page.waitForSelector('.admin-shell', { timeout: 25000 }).catch(() => {})
await page.waitForTimeout(1500)
}
await page.goto('http://localhost:5174/admin-vue/account/users', { waitUntil: 'domcontentloaded' })
await page.waitForTimeout(2200)
const selects = page.locator('.users-filter-row .el-select')
console.log('筛选行 el-select 数量:', await selects.count())
await selects.nth(1).click()
await page.waitForTimeout(700)
const items = page.locator('.el-select-dropdown__item:visible')
console.log('选项:', JSON.stringify(await items.allTextContents()))
await items.filter({ hasText: /^管理员$/ }).first().click()
await page.waitForTimeout(1200)
console.log('change 后请求:', JSON.stringify(userReqs.slice(-1)))
await page.locator('.users-filter-row button.btn').first().click()
await page.waitForTimeout(2500)
console.log('点查询后请求:', JSON.stringify(userReqs.slice(-1)))
console.log('选中显示:', (await selects.nth(1).textContent())?.trim())
console.log('最近 users 请求:', JSON.stringify(userReqs.slice(-2)))
const roles = await page.locator('.table-scroll tbody tr td').nth(2).textContent().catch(() => '?')
console.log('第一行角色:', roles?.trim())
await page.goto('http://localhost:5174/admin-vue/asin-center/skip-price', { waitUntil: 'domcontentloaded' })
await page.waitForTimeout(2000)
await page.locator('.price-range-row input').first().fill('1.15')
await page.locator('.skip-filter-row button.btn').first().click()
await page.waitForTimeout(2500)
console.log('errors:', JSON.stringify(errors))
await browser.close()
-21
View File
@@ -1,21 +0,0 @@
import { chromium } from '@playwright/test'
const BASE = 'http://127.0.0.1:5174'
const browser = await chromium.launch({ channel: 'msedge', headless: true })
const page = await browser.newPage({ locale: 'zh-CN' })
await page.goto(`${BASE}/admin-vue/login`)
await page.waitForSelector('#loginUsername', { timeout: 20000 })
await page.fill('#loginUsername', 'admin')
await page.fill('#loginPassword', 'admin123')
await page.click('button.btn-login')
await page.waitForTimeout(2500)
const ctx = page.context()
console.log('FORCE_SCAN_START')
const resp = await ctx.request.get(`${BASE}/api/admin/shop-data-crawl/duplicate-check-overview?force=1`, { timeout: 300000 })
console.log('HTTP', resp.status())
const body = await resp.json()
const data = body?.data || {}
console.log('pending=', data.pending)
console.log('scanned_at=', data.scanned_at)
console.log('shops=', (data.shops || []).map(s => s.shop_name + '(' + s.group_name + ',' + s.asin_count + ')').join(' | '))
console.log('summary=', JSON.stringify(data.summary))
await browser.close()