Skip to content

feat: exam notice - #503

Merged
Penty-d merged 9 commits into
west2-online:mainfrom
CutebreadCat:course-notice
Aug 1, 2026
Merged

feat: exam notice#503
Penty-d merged 9 commits into
west2-online:mainfrom
CutebreadCat:course-notice

Conversation

@CutebreadCat

Copy link
Copy Markdown
Contributor

自查 PR 结构

  • PR 标题符合这个格式: <type>(optional scope): <description>

  • 此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。

  • 我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)

  • 这个 PR 属于强制变更/破坏性更改

如果是,请在 PR 标题中添加 BREAKING CHANGE 前缀,并在 PR 描述中详细说明。

这个 PR 的类型是什么?

feat

这个 PR 做了什么 / 我们为什么需要这个 PR?

增加了考试通知的功能

(可选)这个 PR 解决了哪个/些 issue?

对 Reviewer 预留的一些提醒

Comment thread internal/course/service/get_course_list.go Outdated
@renbaoshuo renbaoshuo changed the title feat:add exam notice feat: exam notice Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.39726% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/course/service/get_course_list.go 63.63% 16 Missing and 8 partials ⚠️
internal/course/service/exam_snapshot.go 87.32% 6 Missing and 3 partials ⚠️
@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
+ Coverage   64.29%   64.98%   +0.69%     
==========================================
  Files         233      236       +3     
  Lines        6108     6312     +204     
==========================================
+ Hits         3927     4102     +175     
- Misses       2055     2071      +16     
- Partials      126      139      +13     
Flag Coverage Δ
unittest 64.98% <77.39%> (+0.69%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/db/course/exam_offering.go 100.00% <100.00%> (ø)
pkg/db/course/get_course.go 100.00% <100.00%> (ø)
internal/course/service/exam_snapshot.go 87.32% <87.32%> (ø)
internal/course/service/get_course_list.go 76.29% <63.63%> (-3.32%) ⬇️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

// 去重记录已经抢占成功,但通知和快照更新放入同一个异步任务。
// 只有两步都成功,exam_offerings 记录才会继续保留。
if !umeng.EnqueueAsync(func() error {
if err := s.sendExamNotifications(claimed); err != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里enqueue是不是有点问题?一个send里可以包含n个changes,也就是发送2n个umeng请求,但这里dispatcher是按单个做限流的

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改为一个个change推送,并且安卓和ios推送失败不再重试

title := fmt.Sprintf("%v考试信息更新啦", change.Exam.Name)
description := fmt.Sprintf("考试信息更新%v", change.Tag[:12])
if err := umeng.SendAndroidGroupcastWithGoApp(
title, "", "", change.Tag, description, constants.UmengGradeDeeplink,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deeplink得换

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经修正了,新增考场的deeplink

@Penty-d
Penty-d merged commit 16789df into west2-online:main Aug 1, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants