feat(jd-admin): 2026-11-18 客户三条反馈闭环——公司超管收窄到名下+京东类目一级/二级可选中(IN 下推)+级联触发框 34px 对齐
【一、用户管理:公司超管「各自看各自名下」(backend-java AdminUserService)】
客户口径(11-18 截图:阿华66 公司超管看到了 admin 直建的 ssss):平台超管看所有,
其余公司超管只看自己名下。读侧 listUsers 公司超管分支由「本公司全部(role≠super_admin)」
改为 company_id=本公司 AND (id=本人 OR created_by_id=本人)——与组长档同一形状;
自己那行永远可见(保证能改自己密码/额度)。写侧 updateUser/deleteUser 公司超管分支
在「同公司」闸之外加同形「目标 created_by_id=本人」谓词,不留「列表看不见、API 照样改」
的洞(停用/改密/额度全走这条闸)。createUser 不动(新建天然落本人名下)。
口径为直接下级:组长再建的普通号归组长看,不在公司超管列表(如需整棵下级树另拍板)。
判据:AdminUserServiceCompanySuperAdminTest 改 1 增 5(名下可见谓词/超管档反向不收窄/
写侧越权 403 两支+本人建的可编辑);其余 admin 测试类夹具全用超管/组长档,核过不受影响。
【二、京东类目一级/二级可选中(前端展开+后端 IN,零表结构变更,用户拍板路线)】
后端:AdminJdProductController.page 的 category 参数改 List<String>(重复 query key 绑定,
参数名不变、单值形状照常);JdProductQueryService.Filter 逐项 trim/去空白/去重、空集合归
null=不过滤;JdProductMapper.xml productConds 类目谓词 eq→IN+foreach(仍 SQL 侧下推,
铁律 20 同形)。落库仍只有末级类目名,无 schema/迁移改动。
前端:jd-category-tree.ts 新增 jdCategoryAllNodes/jdCategorySearchNodes(搜索铺全层级)
+jdCategoryNamesUnder(path)(选中节点→自身+全部后代类目名集合,含自身因实际末级可能
就在这一级;路径失效回 null 兜单名)。JdCategoryCascader.vue:非末级行圆点点击=选中
(emit change 带名称路径)、行体/箭头仍下钻;选中态按路径比对(同名跨支不串);搜索
结果含一级/二级行。JdDatabasePage/jd-product-filter/jd-product-api:categoryPath 入筛选态,
序列化按子树展开集合,axios paramsSerializer indexes:false 出重复 category= 参数。
已知代价(路线自带、用户已选):不同父级下同名末级会随展开集合一起命中(B112-05 同口径)。
【三、样式(JdCategoryCascader.vue)】
触发框 min-height 42→34px+padding 5x10:main.css:245-248 全局密度收口把相邻 input/
el-select/.btn 压到 34,自绘 button 不在收口清单里才显高;非末级圆点不再永远空心。
【台账】source-pin-ledger.json 重录(UPDATE_SOURCE_PIN_BASELINE=1 官方口):本笔
jd-category-tree.test.ts 用例 6→8;同时把 2a8bdd7d 已提交未记账的
user-menu-tree-platform-filter.test.ts(8 例 0 钉 0 读点)一并登记——基线在该窗陈旧,
此处为台账记账、非卷码。
【验证】mvn -o test-compile rc=0;定向 mvn -o test(AdminUserService* 七类+
AdminJdProductControllerTest)rc=0;admin vue-tsc rc=0;node --test jd-category-tree/
jd-database-page/jd-product-group/cascader-position 全绿;vitest mount jd-database-page
44/44(含本笔新增一级/二级选中用例);ops _push_gate.py --fast overall=pass 四面绿
(首轮后管 readSource 格红=本笔用例数,重录基线后复跑绿)。
发版未做:jar+后管随下一窗口走既有流程;full 闸门未跑(模式 D 口径)。
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"note": "readSource 钉子逐文件基线。两把尺子:pins=落在用例体内的读盘,reads=全文读点总数(含模块级夹具与 helper)。都只许减;pins 下降而 reads 没同步下降=把读盘挪出体内,不算改进。由 tests/source-pin-ratchet.test.ts 生成。",
|
||||
"totals": {
|
||||
"files": 262,
|
||||
"cases": 1837,
|
||||
"files": 263,
|
||||
"cases": 1847,
|
||||
"pins": 460,
|
||||
"reads": 658
|
||||
},
|
||||
@@ -308,7 +308,7 @@
|
||||
"reads": 0
|
||||
},
|
||||
"jd-category-tree.test.ts": {
|
||||
"cases": 6,
|
||||
"cases": 8,
|
||||
"pins": 0,
|
||||
"reads": 0
|
||||
},
|
||||
@@ -1302,6 +1302,11 @@
|
||||
"pins": 2,
|
||||
"reads": 2
|
||||
},
|
||||
"user-menu-tree-platform-filter.test.ts": {
|
||||
"cases": 8,
|
||||
"pins": 0,
|
||||
"reads": 0
|
||||
},
|
||||
"user-notice-chinese-only.test.ts": {
|
||||
"cases": 4,
|
||||
"pins": 0,
|
||||
|
||||
Reference in New Issue
Block a user