feat(brandgating): 品牌Gating库恢复独立菜单
V164 建菜单、V166 回滚后,按 2026-10-25 决定用 V174 恢复独立菜单, 不再作为「店铺数据重复检查」的第三页签;后端权限键同步改为 admin_brand_gating。
This commit is contained in:
@@ -72,6 +72,10 @@ export const OPERATION_GUIDES: Record<string, OperationGuideData> = {
|
||||
text: '店铺数据任务按状态和时间筛选。批量操作前请核对已选任务。',
|
||||
steps: ['筛选任务', '检查状态', '执行批量操作'],
|
||||
},
|
||||
admin_brand_gating: {
|
||||
text: '维护不符合规则的品牌(品牌Gating / 类目Gating)。新增后可用下方筛选快速回查;云端 Gating 库与前端排查软件同步同一份数据,命中后会自动拦截。',
|
||||
steps: ['新增或批量导入', '筛选回查', '按需解除或删除'],
|
||||
},
|
||||
// admin_shop_data_duplicate_check(店铺撞款监控)为例外页:不展示全局提示条,不参与对齐。
|
||||
admin_image_video_tasks: {
|
||||
text: '可先使用筛选缩小任务范围,再查看任务状态、结果和权限范围。',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* 品牌Gating库管理面板:以第三个页签嵌在「店铺数据重复检查」页里。
|
||||
* 品牌Gating库管理页(独立菜单 admin_brand_gating,V174 恢复)。
|
||||
* 数据源 /api/admin/brand-gating(biz_brand_gating,全平台共享,不随公司 Tab 收窄)。
|
||||
*/
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
@@ -49,7 +49,6 @@ const addBusy = ref(false)
|
||||
const batchText = ref('')
|
||||
const importBusy = ref(false)
|
||||
const busyRowId = ref(0)
|
||||
const tipVisible = ref(true)
|
||||
|
||||
const countryOptions = GATING_COUNTRIES.filter((country) => country !== '全部')
|
||||
const typeOptions = GATING_TYPES
|
||||
@@ -219,15 +218,6 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div class="gating-panel">
|
||||
<div v-if="tipVisible" class="g-tip">
|
||||
<span class="g-tip-title">当前页面操作提示</span>
|
||||
<span>
|
||||
维护不符合规则的品牌(品牌Gating / 类目Gating)。新增后可用下方筛选快速回查;云端 Gating 库与前端排查软件同步同一份数据,命中后会自动拦截。
|
||||
<b>Gating 库为全平台共享数据,不随上方公司页签切换。</b>
|
||||
</span>
|
||||
<button class="g-tip-x" type="button" @click="tipVisible = false">收起 ✕</button>
|
||||
</div>
|
||||
|
||||
<div v-if="statsError" class="g-stats-error">
|
||||
<span>统计加载失败:{{ statsError }}</span>
|
||||
<button type="button" @click="loadStats">重试</button>
|
||||
@@ -415,39 +405,6 @@ onMounted(() => {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.g-tip {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
background: #f5f9ff;
|
||||
border: 1px solid #cfe0fb;
|
||||
border-left: 4px solid var(--g-primary);
|
||||
border-radius: 10px;
|
||||
padding: 10px 14px;
|
||||
font-size: 12px;
|
||||
color: #1e40af;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.g-tip-title {
|
||||
flex: none;
|
||||
font-weight: 700;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
.g-tip b {
|
||||
color: #1d4ed8;
|
||||
}
|
||||
.g-tip-x {
|
||||
flex: none;
|
||||
margin-left: auto;
|
||||
border: none;
|
||||
background: none;
|
||||
color: #6b9ef0;
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.g-stats-error {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -13,9 +13,8 @@ import { aggregateDrawerRows, drawerSummaryOf, dupWithinGroup, indexShopGroups,
|
||||
import type { DuplicateConsole, LedgerRow } from './duplicate-console-model.ts'
|
||||
import { ASIN_COUNTRY_CODES, asinCountryLabel } from '../asin/asin-country.ts'
|
||||
import { orderedPair } from '@/utils/datetime'
|
||||
import BrandGatingPanel from './BrandGatingPanel.vue'
|
||||
|
||||
type Tab = 'dup' | 'ledger' | 'gating'
|
||||
type Tab = 'dup' | 'ledger'
|
||||
type Scope = 'global' | 'group'
|
||||
|
||||
const consoleData = ref<DuplicateConsole | null>(null)
|
||||
@@ -432,18 +431,18 @@ onMounted(() => {
|
||||
<div class="dup-head">
|
||||
<div>
|
||||
<h2>店铺数据撞款监控</h2>
|
||||
<p>按 ASIN×店铺×站点分析同一 ASIN 在多家自营店铺/分组内的重复上架;分组归属来自店铺管理,只读展示。品牌Gating库在同一页的第三个页签维护。</p>
|
||||
<p>按 ASIN×店铺×站点分析同一 ASIN 在多家自营店铺/分组内的重复上架;分组归属来自店铺管理,只读展示。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="loadError && activeTab !== 'gating'" class="load-banner">
|
||||
<div v-if="loadError" class="load-banner">
|
||||
<span>{{ loadError }}</span>
|
||||
<button class="btn btn-ghost btn-sm" type="button" @click="loadConsole">重试</button>
|
||||
<button class="btn btn-ghost btn-sm" type="button" @click="loadError = ''">知道了</button>
|
||||
</div>
|
||||
|
||||
<!-- 筛选条件(撞款/台账专用,Gating 页签隐藏) -->
|
||||
<section v-if="activeTab !== 'gating'" class="card filter">
|
||||
<!-- 筛选条件(撞款/台账专用) -->
|
||||
<section class="card filter">
|
||||
<div class="filter-title">筛选条件</div>
|
||||
<div class="filter-row">
|
||||
<div class="f-group">
|
||||
@@ -493,9 +492,9 @@ onMounted(() => {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div v-loading="loading && activeTab !== 'gating'" class="dup-body-wrap">
|
||||
<div v-loading="loading" class="dup-body-wrap">
|
||||
<!-- KPI 统计 -->
|
||||
<section v-if="consoleData && activeTab !== 'gating'" class="kpis">
|
||||
<section v-if="consoleData" class="kpis">
|
||||
<div v-for="kpi in kpis" :key="kpi.label" class="kpi" :class="kpi.tone">
|
||||
<div class="k-label"><span class="k-dot"></span>{{ kpi.label }}</div>
|
||||
<div class="k-value">{{ kpi.value }}</div>
|
||||
@@ -504,7 +503,7 @@ onMounted(() => {
|
||||
</section>
|
||||
|
||||
<!-- 店铺上架分布 -->
|
||||
<section v-if="consoleData && activeTab !== 'gating'" class="card store-strip">
|
||||
<section v-if="consoleData" class="card store-strip">
|
||||
<div class="strip-head">
|
||||
<span class="strip-title">店铺上架分布</span>
|
||||
<span class="strip-note">各店铺在本批站点中的上架记录量(含重复扫描)</span>
|
||||
@@ -527,9 +526,8 @@ onMounted(() => {
|
||||
<div class="tabs">
|
||||
<button class="tab" :class="{ active: activeTab === 'dup' }" type="button" @click="switchTab('dup')">撞款监控 <span class="t-count">{{ totalDupCount }}</span></button>
|
||||
<button class="tab" :class="{ active: activeTab === 'ledger' }" type="button" @click="switchTab('ledger')">全部ASIN台账 <span class="t-count">{{ ledgerTotal }}</span></button>
|
||||
<button class="tab" :class="{ active: activeTab === 'gating' }" type="button" @click="switchTab('gating')">品牌Gating库</button>
|
||||
</div>
|
||||
<div v-if="activeTab !== 'gating'" class="actions">
|
||||
<div class="actions">
|
||||
<span v-if="overview" class="updated">数据更新时间 {{ overview.scannedAt || '—' }}</span>
|
||||
<button v-if="isSuper" class="btn btn-ghost btn-sm" type="button" @click="groupInfoVisible = true">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M23 21v-2a4 4 0 0 0-3-3.87" /><path d="M16 3.13a4 4 0 0 1 0 7.75" /></svg>
|
||||
@@ -546,13 +544,8 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ============ 品牌Gating库(全平台共享数据) ============ -->
|
||||
<template v-if="activeTab === 'gating'">
|
||||
<BrandGatingPanel />
|
||||
</template>
|
||||
|
||||
<!-- ============ 撞款监控 ============ -->
|
||||
<template v-else-if="consoleData && activeTab === 'dup'">
|
||||
<template v-if="consoleData && activeTab === 'dup'">
|
||||
<div v-if="isSuper" class="scope-bar">
|
||||
<div class="seg">
|
||||
<button class="seg-btn" :class="{ active: scope === 'global' }" type="button" @click="switchScope('global')">全店撞款</button>
|
||||
@@ -668,7 +661,7 @@ onMounted(() => {
|
||||
<OldPagination v-if="ledgerTotal" :total="ledgerTotal" :page="ledgerPage" :page-size="ledgerPageSize" @change="goPage" @size-change="changeLedgerSize" />
|
||||
</template>
|
||||
|
||||
<div v-if="!consoleData && activeTab !== 'gating' && !loadError" class="card empty-state">
|
||||
<div v-if="!consoleData && !loadError" class="card empty-state">
|
||||
<div class="e-title">暂无扫描结果</div>
|
||||
请点击右上角「重新分析」触发撞款扫描
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** 品牌Gating库模型(任务:并入「店铺数据重复检查」页签):与 /api/admin/brand-gating 的 camel 契约对齐,纯逻辑。 */
|
||||
/** 品牌Gating库模型(独立菜单页):与 /api/admin/brand-gating 的 camel 契约对齐,纯逻辑。 */
|
||||
|
||||
export const GATING_COUNTRIES = ['全部', '英国', '德国', '法国', '西班牙', '意大利'] as const
|
||||
export const GATING_TYPES = ['品牌gating', '类目gating', '账户不符合'] as const
|
||||
|
||||
@@ -25,6 +25,7 @@ export const adminPages: AdminPageDef[] = [
|
||||
{ path: 'account/user-secret-usage', menuKey: 'admin_user_secret_usage', title: '密钥用量统计', companyScoped: true, load: () => import('@/pages/account/UserSecretUsagePage.vue') },
|
||||
{ path: 'account/companies', menuKey: 'admin_companies', title: '公司管理', superAdminOnly: true, load: () => import('@/pages/account/CompaniesPage.vue') },
|
||||
{ path: 'shop-center/duplicate-check', menuKey: 'admin_shop_data_duplicate_check', title: '店铺撞款监控', companyScoped: true, load: () => import('@/pages/tasks/DuplicateCheckPage.vue') },
|
||||
{ path: 'shop-center/brand-gating', menuKey: 'admin_brand_gating', title: '品牌Gating库', companyScoped: false, load: () => import('@/pages/tasks/BrandGatingPanel.vue') },
|
||||
{ path: 'shop-center/keys', menuKey: 'admin_shop_keys', title: '店铺密钥管理', companyScoped: true, load: () => import('@/pages/shop/ShopKeysPage.vue') },
|
||||
{ path: 'shop-center/shops', menuKey: 'admin_shop_manage', title: '店铺管理', companyScoped: true, load: () => import('@/pages/shop/ShopManagePage.vue') },
|
||||
{ path: 'records/history', menuKey: 'admin_history', title: '生成记录', companyScoped: true, load: () => import('@/pages/records/RecordsHistoryPage.vue') },
|
||||
|
||||
@@ -11,6 +11,8 @@ import { adminPages } from '../src/router/routes.ts'
|
||||
|
||||
const MIGRATION = join(process.cwd(), '..', 'backend-java', 'src', 'main', 'resources', 'db',
|
||||
'V143__company_and_users_company_id.sql')
|
||||
const BRAND_GATING_MIGRATION = join(process.cwd(), '..', 'backend-java', 'src', 'main', 'resources', 'db',
|
||||
'V174__restore_admin_brand_gating_menu.sql')
|
||||
|
||||
interface MigrationMenu {
|
||||
name: string
|
||||
@@ -57,3 +59,18 @@ test('V143 的「公司管理」菜单落到已注册的公司管理页', () =>
|
||||
assert.equal(page.path, companies.routePath, '库里的 route_path 应与注册表路径一致')
|
||||
assert.equal(page.title, companies.name, '页面标题应与菜单名一致')
|
||||
})
|
||||
|
||||
test('V174 恢复的「品牌Gating库」菜单 key 必须在路由注册表登记', () => {
|
||||
const sql = readFileSync(BRAND_GATING_MIGRATION, 'utf8')
|
||||
const menus = menusInsertedBy(sql)
|
||||
const insertCount = (sql.match(/INSERT INTO `columns`/g) || []).length
|
||||
assert.ok(menus.length > 0, 'V174 应当插入后台菜单,一条都没解析出来说明正则失效')
|
||||
assert.equal(menus.length, insertCount, `解析到 ${menus.length} 条,但迁移有 ${insertCount} 条 INSERT INTO columns`)
|
||||
|
||||
const gating = menus.find((menu) => menu.columnKey === 'admin_brand_gating')
|
||||
assert.ok(gating, 'V174 必须插入 admin_brand_gating 菜单')
|
||||
const page = adminPages.find((item) => item.menuKey === 'admin_brand_gating')
|
||||
assert.ok(page, 'routes.ts 必须有 admin_brand_gating 页面,否则菜单点进去 404')
|
||||
assert.equal(page.title, gating.name, '页面标题应与菜单名一致')
|
||||
assert.equal(page.companyScoped, false, 'Gating 库全平台共享,不参与公司 tab')
|
||||
})
|
||||
|
||||
+5
-6
@@ -33,9 +33,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 品牌Gating库(管理后台):独立小网页后台(gating_web_admin.py)并入数富管理后台,
|
||||
* 共用主库同一张 biz_brand_gating 表。
|
||||
*
|
||||
* <p>本模块以「品牌Gating库」页签嵌在「店铺数据重复检查」页(DuplicateCheckPage.vue)里,
|
||||
* 不再占用独立菜单行(V164 菜单已由 V166 删除)。因此页面权限键跟随宿主页
|
||||
* {@code admin_shop_data_duplicate_check},经
|
||||
* <p>本模块占用独立菜单「品牌Gating库」{@code admin_brand_gating}(V164 建菜单、V166 回滚、
|
||||
* V174 恢复),页面权限键与菜单键一致,经
|
||||
* {@link PermissionMenuService#requireConsolePageAccess} 把门;鉴权第一道门由
|
||||
* AdminApiGuardFilter 的 /api/admin 前缀兜底(见 ApiGuardCoverageAuditor 口径)。</p>
|
||||
*/
|
||||
@@ -45,8 +44,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Tag(name = "品牌Gating库(后台)", description = "品牌Gating库的列表/筛选/统计、单条新增、启停、删除与批量导入。")
|
||||
public class BrandGatingController {
|
||||
|
||||
/** 宿主页「店铺数据重复检查」的后台菜单权限键(columns.column_key)。 */
|
||||
private static final String PERMISSION_KEY = "admin_shop_data_duplicate_check";
|
||||
/** 「品牌Gating库」独立菜单的后台权限键(columns.column_key)。 */
|
||||
private static final String PERMISSION_KEY = "admin_brand_gating";
|
||||
private static final String DENIAL_MESSAGE = "无权访问品牌Gating库";
|
||||
|
||||
private final BrandGatingService brandGatingService;
|
||||
@@ -112,7 +111,7 @@ public class BrandGatingController {
|
||||
return ApiResponse.success(brandGatingService.importRows(body));
|
||||
}
|
||||
|
||||
/** 逐端点把门:登录态 + 宿主页后台菜单权限(admin_shop_data_duplicate_check)。 */
|
||||
/** 逐端点把门:登录态 + 「品牌Gating库」后台菜单权限(admin_brand_gating)。 */
|
||||
private void requireBrandGatingAccess(HttpServletRequest request) {
|
||||
AdminUserEntity operator = adminAuthSupport.requireUser(request);
|
||||
permissionMenuService.requireConsolePageAccess(operator, DENIAL_MESSAGE, PERMISSION_KEY);
|
||||
|
||||
+1
@@ -80,6 +80,7 @@ public class PermissionMenuSchemaInitializer {
|
||||
new DefaultAdminMenu("密钥用量统计", "admin_user_secret_usage", "account/user-secret-usage", 42, "admin_group_account"),
|
||||
new DefaultAdminMenu("去重数据汇总", "admin_dedupe_total_data", "dedupe-total-data", 30, "admin_group_data"),
|
||||
new DefaultAdminMenu("品牌数据库", "admin_invalid_asin_data", "invalid-asin-data", 35, "admin_group_data"),
|
||||
new DefaultAdminMenu("品牌Gating库", "admin_brand_gating", "brand-gating", 36, "admin_group_data"),
|
||||
new DefaultAdminMenu("查询ASIN", "admin_query_asin", "query-asin", 65, "admin_group_data"),
|
||||
new DefaultAdminMenu("商品类目", "admin_product_categories", "product-categories", 66, "admin_group_data"),
|
||||
new DefaultAdminMenu("店铺密钥管理", "admin_shop_keys", "shop-keys", 40, "admin_group_shop"),
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
-- =============================================================
|
||||
-- 迁移 V174__restore_admin_brand_gating_menu
|
||||
--
|
||||
-- 1. 变更目的:按 2026-10-25 决定,把「品牌Gating库」恢复为独立后台菜单
|
||||
-- (column_key='admin_brand_gating',route_path='brand-gating'),不再作为
|
||||
-- 「店铺数据重复检查」页的第三个页签。V164 首次落库、V166 回滚删除;已应用迁移
|
||||
-- 一个字节都不许改,故由本迁移重新插入。
|
||||
--
|
||||
-- 2. 口径:沿用 V164 的数据形状——挂在数据管理组 admin_group_data 下、排序 36,
|
||||
-- company_id = 1 为模板行,其余公司(含 status=0 的停用公司)逐家复制一份;
|
||||
-- 子行 parent_id 必须认本公司 admin_group_data 组行,严禁跨公司认父。
|
||||
-- 幂等守卫按 (company_id, column_key) 判存,同时防 (menu_type, route_path)
|
||||
-- 唯一键 uk_company_menu_type_route_path 撞行。
|
||||
--
|
||||
-- 3. 默认授权:本迁移不预授 user_column_permission;管理员角色链可直进,
|
||||
-- 普通账号由管理员在「菜单权限配置」里按公司分配。
|
||||
--
|
||||
-- 4. 影响表与数据量:columns +N 行(N = 公司数),字典小表,毫秒级,不碰锁热点表。
|
||||
--
|
||||
-- 5. 【可重跑性】两段 INSERT 都带 NOT EXISTS 守卫;重跑逐条 no-op。
|
||||
-- =============================================================
|
||||
|
||||
-- ---------- 1. 公司 1 模板行(认公司 1 的 admin_group_data 组行) ----------
|
||||
INSERT INTO `columns` (`name`, `column_key`, `menu_type`, `route_path`, `sort_order`, `parent_id`, `company_id`)
|
||||
SELECT '品牌Gating库', 'admin_brand_gating', 'admin', 'brand-gating', 36, grp.`id`, 1
|
||||
FROM `columns` grp
|
||||
WHERE grp.`company_id` = 1 AND grp.`column_key` = 'admin_group_data'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM `columns`
|
||||
WHERE `company_id` = 1
|
||||
AND (`column_key` = 'admin_brand_gating'
|
||||
OR (`menu_type` = 'admin' AND `route_path` = 'brand-gating'))
|
||||
);
|
||||
|
||||
-- ---------- 2. 复制到其余公司(含停用公司),各自认本公司组行 ----------
|
||||
INSERT INTO `columns` (`name`, `column_key`, `menu_type`, `route_path`, `sort_order`, `parent_id`, `company_id`)
|
||||
SELECT '品牌Gating库', 'admin_brand_gating', 'admin', 'brand-gating', 36, grp.`id`, c.`id`
|
||||
FROM `company` c
|
||||
JOIN `columns` grp ON grp.`company_id` = c.`id` AND grp.`column_key` = 'admin_group_data'
|
||||
WHERE c.`id` <> 1
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM `columns` col
|
||||
WHERE col.`company_id` = c.`id`
|
||||
AND (col.`column_key` = 'admin_brand_gating'
|
||||
OR (col.`menu_type` = 'admin' AND col.`route_path` = 'brand-gating'))
|
||||
);
|
||||
|
||||
-- ---------- 3. 自检闸门:不为 0 就抛 1048(列 must_be_zero NOT NULL) ----------
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS `_v174_gate` (`must_be_zero` INT NOT NULL);
|
||||
|
||||
-- 闸门 1:每家公司都必须恰好一行 admin_brand_gating(少一家也算错)
|
||||
INSERT INTO `_v174_gate`
|
||||
SELECT IF(COUNT(*) = 0, 0, NULL)
|
||||
FROM (
|
||||
SELECT c.`id`
|
||||
FROM `company` c
|
||||
LEFT JOIN `columns` col ON col.`company_id` = c.`id` AND col.`column_key` = 'admin_brand_gating'
|
||||
GROUP BY c.`id`
|
||||
HAVING COUNT(col.`id`) <> 1
|
||||
) bad;
|
||||
|
||||
-- 闸门 2:admin/brand-gating 路由不允许被别的 column_key 占行
|
||||
INSERT INTO `_v174_gate`
|
||||
SELECT IF(COUNT(*) = 0, 0, NULL)
|
||||
FROM `columns` col
|
||||
WHERE col.`menu_type` = 'admin'
|
||||
AND col.`route_path` = 'brand-gating'
|
||||
AND col.`column_key` <> 'admin_brand_gating';
|
||||
|
||||
-- 闸门 3:admin_brand_gating 行的父必须是本公司的 admin_group_data 组行
|
||||
INSERT INTO `_v174_gate`
|
||||
SELECT IF(COUNT(*) = 0, 0, NULL)
|
||||
FROM (
|
||||
SELECT col.`id`
|
||||
FROM `columns` col
|
||||
LEFT JOIN `columns` grp ON grp.`id` = col.`parent_id` AND grp.`column_key` = 'admin_group_data'
|
||||
WHERE col.`column_key` = 'admin_brand_gating'
|
||||
AND (grp.`id` IS NULL OR grp.`company_id` <> col.`company_id`)
|
||||
) bad;
|
||||
|
||||
DROP TEMPORARY TABLE `_v174_gate`;
|
||||
+2
-2
@@ -464,12 +464,12 @@ class BrandGatingServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("控制器契约:随宿主页用 admin_shop_data_duplicate_check 权限键、逐端点 requireUser + requireConsolePageAccess 把门")
|
||||
@DisplayName("控制器契约:独立菜单用 admin_brand_gating 权限键、逐端点 requireUser + requireConsolePageAccess 把门")
|
||||
void controllerGatesEveryEndpointWithPermissionKey() throws Exception {
|
||||
String source = Files.readString(Path.of(
|
||||
"src/main/java/com/nanri/aiimage/modules/brandgating/controller/BrandGatingController.java"),
|
||||
StandardCharsets.UTF_8);
|
||||
assertThat(source).contains("PERMISSION_KEY = \"admin_shop_data_duplicate_check\"");
|
||||
assertThat(source).contains("PERMISSION_KEY = \"admin_brand_gating\"");
|
||||
assertThat(source).contains("adminAuthSupport.requireUser(request)");
|
||||
assertThat(source).contains("requireConsolePageAccess(operator, DENIAL_MESSAGE, PERMISSION_KEY)");
|
||||
// 6 个端点方法都必须先过把门助手
|
||||
|
||||
Reference in New Issue
Block a user