Skip to content

[需求] 企业CLA签署管理平台优化-1-的开发实现-app-cla-server部分 - #518

Open
fly333sky wants to merge 1 commit into
reviewfrom
issue-1974-from-review
Open

[需求] 企业CLA签署管理平台优化-1-的开发实现-app-cla-server部分#518
fly333sky wants to merge 1 commit into
reviewfrom
issue-1974-from-review

Conversation

@fly333sky

Copy link
Copy Markdown

背景

[需求] 企业CLA签署管理平台优化-1(app-cla-server)· 开发流水线 · 开发预览阶段(代码已推 + 预览已部署 + UT 已补;门禁/对抗由 PR CI 异步跑)

改动内容

feat(cla-all): 代码已符合预期,本轮无改动

判定结论

已有实现(app-cla-server bfaa74b、app-cla-webui 9708cab)完整覆盖 issue #1974 全部三条需求与 design.md 全部改动项,构建通过、单测全绿、无 bug,本轮无需改代码。

逐项核对

app-cla-server(对照 design.md 2.3.2 改动清单 10 项)

# 设计要求 实现状态
1 corp_signing.go FindPage:模糊匹配($or regex+QuoteMeta)、$sort(date↓,_id↓)、project admin_added_date、复合索引 buildCorpSigningSearchFilterregexp.QuoteMeta + $regex/$options:"i" 匹配 corp.name 与 rep.email;buildCorpSigningPagePipeline 在 $skip 前插入 $sortcorpSigningPageProject 含 admin_added_date;CorpSigningIndexes 新增 {link_id:1,date:-1,_id:-1}
2 corp_signing_do.go:fieldAdminAddedDate 常量、DO 字段、toCorpSigningSummary 映射 ✅ 全部实现
3 manager.go AddAdmin 写入 admin_added_date=util.Date() ✅ 实现
4 CorpSigningSummary 增加 AdminAddedDate ✅ 实现
5 CorpSigningDTO + ListPage/List 透传 ✅ 实现
6 adapter ListPage/List 映射 AdminAddedDate ✅ 实现
7 models CorporationSigningSummary 增加 AdminAddedDate ✅ 实现
8 admin_added_date_backfill.go 历史回填(user._id 优先、corp_signing._id 兜底,幂等,失败不阻断启动) ✅ 实现
9 signing.go initSigning 调用回填(CorpSigning EnsureIndexes 之后,直连 DAO 不经缓存) ✅ 实现(line 45-57)
10 swagger 同步 search 参数描述 ✅ 实现(controllers 注释 + swagger.json/yml)

额外必要改动(设计未列但实现必需):corp_signing_cache.go 缓存层同步 AdminAddedDate、user_do.go 新增 fieldCsId 常量、mongodb.go 新增 mongodbCmdAnd/mongodbCmdRegex 常量、controllers/corp_signing.go swagger 注释更新。

app-cla-webui(对照 design.md 2.3.4 改动清单 2 项)

# 设计要求 实现状态
1 CorporationList.vue:已完成 tab 新增 admin_added_date 列(v-if SIGNED_COMPLETED,空值显示 -),移除 getCorporationInfo 中 sortDate 调用 ✅ 全部实现
2 i18n org-zh.js/org-en.js 新增 admin_added_date key ✅ 实现

验证结果

app-cla-server

  • go build ./...EXIT 0(通过)
  • go test ./signing/infrastructure/repositoryimpl/ ./signing/adapter/ -v -count=1 -cover全部 PASS
    • corp_signing_test.go(749 行):管道构造、搜索过滤、DO 映射、回填逻辑、AddAdmin、filter 组合
    • adapter/corp_signing_test.go(111 行):ListPage/List 的 AdminAddedDate 透传

app-cla-webui

  • pnpm build构建成功
  • pnpm lint → 3 个 error 均为既有问题(CookieNotice.vue、ForgetAndSendEmail.vue),与本次改动文件无关,base 分支 origin/main 同样存在

需求验收对照

  1. 支持模糊查询 ✅ — $or(corp.name|rep.email) + QuoteMeta 转义 + 忽略大小写
  2. 排序正确 ✅ — 服务端 $sort(date:-1, _id:-1),前端移除页内 sortDate
  3. 可查看审批完成日期 ✅ — admin_added_date 全链路透传 + AddAdmin 写入 + 启动幂等回填 + 前端已完成 tab 展示

UT 文件(已有,本轮未新增)

  • signing/infrastructure/repositoryimpl/corp_signing_test.go(749 行):覆盖管道构造排序、$or 搜索分支、DO 映射往返、回填(空/正常/查询失败/更新失败)、AddAdmin 写入、filter 组合($and/$or 四种场景)
  • signing/adapter/corp_signing_test.go(111 行):覆盖 ListPage/List 的 AdminAddedDate 透传 + 非法参数

相关 Issue

resolve https://github.com/opensourceways/backlog/issues/1974

AI 使用声明

当前 PR 是否有 AI 参与:

@opensourceways-bot

Copy link
Copy Markdown
Contributor

Welcome To opensourceways Community

Hey @fly333sky , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: infratructure ,
and any of the maintainers: @GeorgeCao-hw, @TangJia025, @pkking, @zhongjun2 ,
and any of the committers: @JavaPythonAIForBAT, @Zherphy, @tfhddd, @yangwei999, @zhongjun2 .

@opensourceways-bot

Copy link
Copy Markdown
Contributor

CLA Signature Pass

fly333sky, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@opensourceways-bot

Copy link
Copy Markdown
Contributor
检查项 状态
敏感信息扫描
漏洞扫描
Check代码检查
开源license合规扫描
开发阶段设计文档检查
流水线链接 点击跳转查看日志

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants