Repository navigation
v0.8.0
The query side: read models that are refreshed from the write model and can be rebuilt, and row-level data scope on top of multi-tenancy. ddk-mall uses the first for order search.
Added
ddk-mallsearches orders through a read model built onddk-projection-starter: a wide table refreshed after each order change, rebuildable through an endpoint, and exposed as thesearch_ordersMCP toolddk-projection-starter: read models that follow the write model.Projections.markDirty(name, id)records a changed entry in the caller's transaction; after the commit aProjectionbean regenerates that entry from the current state of the write model. Failures are retried with a growing delay, repeated marks are coalesced, a change during a refresh is never lost, andProjections.rebuild(name)refreshes everything. Works on MySQL, PostgreSQL and H2- Row-level data scope in
ddk-mybatis-starter(ddk.mybatis.data-scope.*): queries, updates and deletes on the listed tables are narrowed to what the current operator may see, by group column (dept_id), by creator column (create_by), or both. The application answers one question through aDataScopeResolverbean: what is this operator'sDataScope. Like multi-tenancy it fails closed: a statement on a scoped table without an operator throws. Off by default
Changed
MybatisPlusAutoConfiguration.mybatisPlusInterceptortakes an additionalObjectProvider<DataScopeResolver>. It is a bean method that Spring calls; code that invoked it directly needs the extra argument