Commit 308bd76
committed
fix: correct notification ID handling and validation
1. Fixed BubbleModel to use entity id instead of bubble id for data
retrieval
2. Updated BubblePanel to check for InvalidId (0) instead of id > 0 when
closing bubbles
3. Modified DataAccessorProxy to return empty entity instead of
cascading fetch when primary source fails
4. Changed MemoryAccessor to generate unique negative IDs for in-memory
entities to avoid conflicts
5. Updated NotifyEntity to use InvalidId constant (0) instead of -1 for
invalid state
6. Added InvalidId constant definition in NotifyEntity header
7. Fixed NotificationManager to properly handle replace operations and
return false when replace fails
8. Ensured consistent ID validation across all components using
InvalidId constant
Log: Fixed notification display issues where incorrect IDs caused
mismatched notifications
Influence:
1. Test notification display in bubble panel with various notification
types
2. Verify bubble closing functionality works correctly
3. Test notification replacement scenarios
4. Check memory-only notification handling
5. Validate notification persistence and retrieval from database
6. Test edge cases with invalid notification IDs
7. Verify notification matching and display consistency
fix: 修正通知ID处理和验证逻辑
1. 修复BubbleModel使用实体ID而非气泡ID进行数据检索
2. 更新BubblePanel在关闭气泡时检查InvalidId(0)而非id>0
3. 修改DataAccessorProxy在主数据源失败时返回空实体而非级联查询
4. 更改MemoryAccessor为内存实体生成唯一的负ID以避免冲突
5. 更新NotifyEntity使用InvalidId常量(0)而非-1表示无效状态
6. 在NotifyEntity头文件中添加InvalidId常量定义
7. 修复NotificationManager正确处理替换操作并在替换失败时返回false
8. 确保所有组件使用InvalidId常量进行一致的ID验证
Log: 修复通知显示问题,错误的ID导致通知匹配混乱
Influence:
1. 测试气泡面板中各种通知类型的显示
2. 验证气泡关闭功能正常工作
3. 测试通知替换场景
4. 检查仅内存通知的处理
5. 验证通知持久化和从数据库检索
6. 测试无效通知ID的边缘情况
7. 验证通知匹配和显示一致性
PMS: BUG-3490531 parent ebed3d8 commit 308bd76
File tree
7 files changed
+13
-10
lines changed- panels/notification
- bubble
- common
- server
7 files changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
396 | 397 | | |
397 | 398 | | |
398 | | - | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
402 | | - | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| |||
0 commit comments