Commit Graph

58 Commits

Author SHA1 Message Date
huangping 8ee9aa51d8 feat: add ONLYOFFICE document preview for contract attachments
DocumentPreviewController provides preview config and file streaming endpoints. ContractDetailView adds 'preview' button to attachment list and opens ONLYOFFICE iframe dialog.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:09 +08:00
huangping 8c788ea388 feat: add dashboard with ECharts and SN/callback statistics
Added sn-stats and callback-stats endpoints. HomeView now shows stat cards, pending todos, recent activity, and ECharts pie charts for SN status distribution and callback status. Installed echarts dependency.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:09 +08:00
huangping 5d50d2819b feat: add system params persistence and delivery gate enforcement
V25 migration creates platform_system_param table. SystemParamController replaces localStorage MVP with backend persistence. LicenseSnService.create now checks deliveryGateEnabled flag and blocks SN creation when gate is on but no deliveries completed.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:02 +08:00
huangping 8c167d4909 feat: add user management CRUD and platform_user table
V24 migration creates platform_user table. Backend UserAdminController provides list/create/update/toggleStatus. Frontend UserManagementView enables admin to add/edit/disable users. Replaces hardcoded auth with database-backed user lifecycle.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:02 +08:00
huangping 118790486a fix: rewrite AuthController with database-driven authentication
Replaced hardcoded admin/sales/delivery/ops users with PlatformUser table lookups. Fixed changePassword to use JWT SecurityContext for current user lookup. Implemented real resetPassword and forceLogout endpoints (previously no-ops). Added BCrypt password verification.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:02 +08:00
huangping 7fb3eb53c3 feat: add customer summary aggregation with real contract count
Fixed getCustomerSummary() to actually query contract count instead of returning hardcoded 0. Injected PlatformContractMapper for the query.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:53 +08:00
huangping 23984a3651 feat: add failure reason persistence and batch replay endpoints to callback inbox
Added failureReason field to CallbackInboxStatusPatchRequest so Ops can categorize failure causes. Added POST /batch-replay for mass reprocess and GET /stats/backlog for backlog monitoring.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:53 +08:00
huangping 25395a648b fix: remove error message leakage in LicenseController and ContractController
Replaced try-catch blocks returning e.getMessage() in HTTP 500 responses with proper ResponseStatusException propagation through global ApiExceptionHandler. Added file size (50MB) and MIME type whitelist validation to contract attachment upload.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:53 +08:00
huangping 0abb60fd2d fix: resolve 500 errors from missing @RequestParam value attributes
All @RequestParam annotations without explicit value= attributes cause parameter name resolution failures when Java -parameters compiler flag is not set. Fixed AuditController, IntegrationCatalogController, CustomerController, ReportController, UserAdminController, SecurityConfig.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:43 +08:00
huangping 147142f44f feat(m10): add audit retention policy configuration 2026-05-25 15:05:54 +08:00
huangping 1cef437fb3 feat(m5): add simulated callback event delivery for testing 2026-05-25 15:04:03 +08:00
huangping ca1279162b feat(m1): add customer freeze/unfreeze 2026-05-25 15:03:23 +08:00
huangping 7104976bf9 feat(m11): add password reset, owner fields, system params 2026-05-25 14:53:02 +08:00
huangping d6750f1e93 feat: add feature mapping view and notification template config 2026-05-25 14:52:45 +08:00
huangping 6522f02b54 feat(m4): add batch SN ops, delivery gate, console link, SN tags 2026-05-25 14:51:41 +08:00
huangping 4dc8341e7e feat(m2): add SKU mapping between contract lines and license features 2026-05-25 14:50:31 +08:00
huangping 8d1081b2b9 feat(m2): add external/internal order ID to contracts 2026-05-25 14:49:40 +08:00
huangping 16ab474bee feat(m3): add field environment info (address, network, contact) to delivery 2026-05-25 14:49:34 +08:00
huangping 85d2b85b6a fix: add userId filter to audit search and login lockout logic 2026-05-25 14:46:42 +08:00
huangping e96383433d feat(m1): add project stakeholder CRUD 2026-05-25 14:46:30 +08:00
huangping 4bbf1f552f feat(m2): add signing/effective/end date fields to contracts 2026-05-25 14:46:19 +08:00
huangping 1726f486fa fix: add amount UI to contract lines and reason code to SN activation 2026-05-25 14:45:54 +08:00
huangping 769bf721f4 fix: handle ConstraintViolationException as 400 instead of 500 2026-05-25 02:38:29 +08:00
huangping 14b86df124 docs(db): add Chinese comments for all 28 platform tables and columns 2026-05-25 02:28:02 +08:00
huangping 3bb19537fe feat(m11): add v-permission directive and button-level permission codes 2026-05-25 01:41:50 +08:00
huangping 1f599e5646 feat(m11): align role model with product definition (SALES/DELIVERY/LICENSE_OPS) 2026-05-25 01:41:04 +08:00
huangping d933639518 feat(m10): add audit event search and CSV export 2026-05-25 01:38:48 +08:00
huangping c088c0ed71 feat(m9): add CSV export for contract-sn report 2026-05-25 01:37:37 +08:00
huangping 46f28d2d97 feat(m6): add JSON template CRUD with versioning 2026-05-25 01:36:40 +08:00
huangping ae880c47b2 feat(m6): add BitAnswer ID mapping CRUD 2026-05-25 01:35:25 +08:00
huangping 36b6e395c5 feat(m11): add password change with profile page 2026-05-25 01:33:54 +08:00
huangping 3ab1165e69 feat(m11): add login failure lockout after 5 failed attempts in 15 min 2026-05-25 01:33:11 +08:00
huangping 33773928c3 feat(m2): add contract change versioning with CHANGING state 2026-05-25 01:32:20 +08:00
huangping 88c4e22d36 feat(m2): add contract attachment upload and listing 2026-05-25 01:31:01 +08:00
huangping cc7fef8ae9 feat(m4): add SN batch import with text area dialog 2026-05-25 01:29:40 +08:00
huangping b5317d8f58 feat(m1): add customer detail aggregation view 2026-05-25 01:28:36 +08:00
huangping bfb8f23399 feat(m1): add planned start/end dates and project manager to projects 2026-05-25 01:27:15 +08:00
huangping b536a999f0 feat(m1): add industry/address/billing/customerCode fields to customer 2026-05-25 01:26:22 +08:00
huangping d0783aa893 feat(m6): add CRUD dialogs for environments and product lines 2026-05-25 01:15:56 +08:00
huangping ea233dd039 fix(report): implement getProjectHealth with real data queries 2026-05-25 01:15:01 +08:00
huangping 8b00f401be feat: add M9 ReportService + ReportController 2026-05-25 01:04:04 +08:00
huangping ba38897f73 feat: add M8 TodoService + TodoController 2026-05-25 01:02:46 +08:00
huangping fa2a50e755 feat(db): add M8 notification and todo tables 2026-05-25 01:01:34 +08:00
huangping 75e6d6d5ec feat: add M7 DeviceController + Callback device event linking 2026-05-25 01:00:43 +08:00
huangping f94f2b91e8 feat: add M7 DeviceService and DTOs 2026-05-25 00:59:12 +08:00
huangping 58b947a366 feat(m7): add DeviceStatus enum and PlatformDevice/PlatformDeviceSnBinding/PlatformDeviceSwapRequest entities with mappers 2026-05-25 00:57:10 +08:00
huangping b13d17702e feat(db): add M7 device management tables (device, sn_binding, swap_request) 2026-05-25 00:54:42 +08:00
huangping 6f79bb97d9 feat(platform): add LicenseSigner, LicenseService, LicenseController, and persistence entities 2026-05-18 22:27:03 +08:00
huangping 91aabb500c feat: extend Java config, Schema, and DB for selfhosted licensing SDK 2026-05-18 22:20:14 +08:00
huangping 6b3f1bdab5 chore: upgrade Spring Boot 3.4.5 -> 4.0.0 with compiler and SecurityConfig fixes
- Move maven-compiler-plugin from pluginManagement to plugins for proper release 17 inheritance
- Remove deprecated UserDetailsServiceAutoConfiguration exclude (removed in Boot 4.0)
- Switch MyBatis-Plus to boot4-starter
2026-04-28 18:39:54 +08:00