fix(XZH-21): align note history to notes.version, wire inbox into unified trash, migrate history on category delete

- NotesController: snapshot written under result version; history/{version} no longer falls back to current content; DBG removed
- V18: legacy_versioning flag so pre-upgrade history keeps its numbering
- NoteCategoriesController: migrate notes + history on category delete (includes trashed notes), snapshot at result version
- InboxController/TrashService/AdminToolsController: inbox items soft delete, restore, purge; recapture revives trashed item
- PlannerController batch tags scoped by kind; Dashboard taskCounts.due shares today-tasks filter
- Tests: 34 passing (3 new regression cases)
This commit is contained in:
HiFox Agent committed 2026-11-11 20:50:40 +08:00
1 parent 1bd637528d
commit a60ea8d262
10 files changed
+236 -58

No files matched your search

@@ -69,8 +69,8 @@ public class PlannerController {
case "tags" -> {
var tags=db.queryForList("select tags from planner_items where kind=? and id=? and deleted_at is null for update",String.class,kind,id)
.stream().findFirst().orElseThrow(PlannerController::missing);
require(db.update("update planner_items set tags=?,updated_at=now() where id=?",
LibraryFields.tags(tags+","+(input.value()==null?"":input.value())),id));
require(db.update("update planner_items set tags=?,updated_at=now() where kind=? and id=? and deleted_at is null",
LibraryFields.tags(tags+","+(input.value()==null?"":input.value())),kind,id));
}
default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST,"操作不适用于此模块");
}