refactor: 积分系统拆分为独立 erp-points crate
- 新建 erp-points crate(8 Entity + account/product service + handler) - 商品 CRUD 和账户管理完整实现,订单/签到/规则端点暂返回 501 - 注册到 workspace + erp-server 路由 /api/v1/points/* - API 路径不变,前端无需修改
This commit is contained in:
@@ -122,3 +122,13 @@ impl FromRef<AppState> for erp_ai::AiState {
|
||||
state.ai_state.clone()
|
||||
}
|
||||
}
|
||||
|
||||
/// Allow erp-points handlers to extract their required state.
|
||||
impl FromRef<AppState> for erp_points::PointsState {
|
||||
fn from_ref(state: &AppState) -> Self {
|
||||
Self {
|
||||
db: state.db.clone(),
|
||||
event_bus: state.event_bus.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user