1.增加按“时间”、“标题”、“企微状态”查询 2.增加数据统计在列表顶部 3.增加分页功能
This commit is contained in:
1 parent
0c471efb9f
commit
9d4092bc7f
14 files changed
+447
-108
No files matched your search
@@ -31,11 +31,8 @@ import (
|
||||
|
||||
// 周一讲师汇总提醒的规则键(ruleKeyNotifyWeeklyLecturer* 定义在
|
||||
// training_scheduler.go,同包共享);defaultWeeklyRemindHour 与需求"每周一 09:00"
|
||||
// 一致(北京时间)。pushLogDefaultLimit 推送记录默认拉取条数。
|
||||
const (
|
||||
defaultWeeklyRemindHour = 9
|
||||
pushLogDefaultLimit = 200
|
||||
)
|
||||
// 一致(北京时间)。
|
||||
const defaultWeeklyRemindHour = 9
|
||||
|
||||
// beijingZone 需求口径统一 Asia/Shanghai(周次/发送时点不随服务器时区漂移)。
|
||||
var beijingZone = time.FixedZone("Asia/Shanghai", 8*3600)
|
||||
@@ -642,15 +639,13 @@ func wecomDispatchContent(row *claimedNotification) string {
|
||||
// 推送记录(管理台逐人明细)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// ListPushLogs 管理端逐人推送明细:tr_notifications 按场景/引用过滤后映射
|
||||
// 收件人姓名与工号(org_employees 联 users 展示名)。
|
||||
// ListPushLogs 管理端逐人推送明细:tr_notifications 按时间/标题/企微状态/
|
||||
// 场景过滤后分页取数,映射收件人姓名与工号(org_employees 联 users 展示名),
|
||||
// 连同命中总数与全量状态统计一起组装分页结果。
|
||||
func (s *trainingService) ListPushLogs(
|
||||
ctx context.Context, tenantID uint64, scenes []string, refType string, limit int,
|
||||
) ([]*types.TrainingPushLog, error) {
|
||||
if limit <= 0 {
|
||||
limit = pushLogDefaultLimit
|
||||
}
|
||||
rows, err := s.repo.ListPushLogs(ctx, tenantID, scenes, refType, limit)
|
||||
ctx context.Context, tenantID uint64, q *types.TrainingPushLogQuery,
|
||||
) (*types.TrainingPushLogPage, error) {
|
||||
rows, total, stats, err := s.repo.ListPushLogs(ctx, tenantID, q)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -685,5 +680,5 @@ func (s *trainingService) ListPushLogs(
|
||||
}
|
||||
out = append(out, item)
|
||||
}
|
||||
return out, nil
|
||||
return &types.TrainingPushLogPage{Items: out, Total: total, Stats: stats}, nil
|
||||
}
|
||||
Reference in new issue
Block a user