Commit e6d1fc9
Refactor MemeAggregationServiceImpl to eliminate code duplication
Extracted common pattern from increaseMemeViewCount, increaseMakeCustomMemeCount,
and increaseShareMemeCount into a generic recordMemeActivity method that uses
functional interfaces to parameterize behavior.
This refactoring:
- Eliminates repeated code pattern (getMeme -> saveLog -> updateCache)
- Improves maintainability by centralizing the logic
- Makes the three public methods more concise and readable
- Preserves all existing behavior and transaction semantics
- All tests continue to pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 312323d commit e6d1fc9
File tree
1 file changed
+18
-9
lines changed- src/main/java/spring/memewikibe/application
1 file changed
+18
-9
lines changedLines changed: 18 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 50 | + | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
| |||
0 commit comments