System Management
System Management
FastBee is built on the RuoYi-Vue permission framework, using Spring Boot + Spring Security + MyBatis + Vue + Element UI. This guide covers each management module in the context of the FastBee IoT platform.
Permission Framework Overview
| Layer | Mechanism | Description |
|---|---|---|
| Authentication | Spring Security + JWT | JWT Token issued after login, verified on each request |
| Menu Permission | @PreAuthorize + v-hasPermi | Backend API-level + frontend button-level control |
| Data Permission | @DataScope annotation | Control data visibility scope (all/department/self) |
Backend Permission Check
Each menu/button has a unique permission string (e.g., iot:device:list), validated via @PreAuthorize:
@PreAuthorize("@ss.hasPermi('iot:device:list')")
public TableDataInfo list(Device device) { ... }Frontend Permission Control
Frontend uses v-hasPermi directive for button visibility:
<el-button v-hasPermi="['iot:device:add']">Add</el-button>
<el-button v-hasPermi="['iot:device:edit']">Edit</el-button>
<el-button v-hasPermi="['iot:device:remove']">Delete</el-button>User Management
Manage all system users including administrators, operators, and end users.
- Create / edit / delete users, assign roles and departments
- Reset passwords, lock / unlock accounts
- Set user status (active / disabled)
- Assign users to organizations (multi-tenant scenarios)
FastBee Scenarios
- Admin: Full access to all products and devices
- Operator: View device status and handle alerts, but no system config changes
- End User: View and operate only their own devices
Role Management
Define roles with menu permissions and data permissions.
Menu Permissions
Select accessible menus and action buttons for each role. A role can be assigned to multiple users.
Data Permissions
Control the data scope each role can access:
| Type | Description |
|---|---|
| All | Access all data |
| Custom | Access specific departments |
| Department | Own department only |
| Department & Below | Own department and sub-departments |
| Self Only | Only data created by the user |
FastBee Scenarios
Data permissions enable: operators manage only their assigned area's devices, end users see only their bound devices.
Department Management
Tree-structured organization with multi-level departments.
- Create company → department → team hierarchy
- Associate users with departments
- Data permissions use departments as the base dimension
Position Management
Define user positions such as administrator, operations engineer, project manager, etc.
Menu Management
Manage system menus, operation permissions, and button permission identifiers. Three types:
| Type | Description | Example |
|---|---|---|
| Directory (M) | Top-level navigation | IoT, System |
| Menu (C) | Page-level entries | Product, Device |
| Button (F) | In-page operations | Add, Edit, Delete, Export |
Common FastBee Permission Strings
| Module | Permission String | Description |
|---|---|---|
| Product | iot:product:list/add/edit/remove | Product CRUD |
| Device | iot:device:list/add/edit/remove | Device CRUD |
| Thing Model | iot:model:list/add/edit/remove | Model CRUD |
| Alert | iot:alert:list/add/edit/remove | Alert CRUD |
| Rule Engine | iot:rules:list/add/edit/remove | Rule CRUD |
Dictionary Management
Maintain fixed dropdown options and enum values used across the system.
Common FastBee dictionaries:
| Type | Description | Examples |
|---|---|---|
| iot_product_status | Product status | Unpublished, Published |
| iot_device_status | Device status | Online, Offline, Disabled |
| iot_auth_type | Auth type | Simple, Encrypted |
| iot_protocol_type | Protocol | MQTT, Modbus, TCP, CoAP, HTTP |
| iot_data_type | Data type | Integer, Float, String, Boolean, Enum |
| iot_device_type | Device type | Direct, Gateway, Sub-device |
Tips
Define dictionary types before building new IoT modules. Frontend and backend retrieve values via the dictionary API for consistency.
Parameter Settings
Global system configuration:
- User: Self-registration switch, initial password, password policy
- Login: Captcha switch, lock after failed attempts, lock duration
- Session: Token validity, concurrent login control
- Other: File upload size limits, system name and logo
Operation Log
Record all system operations for audit trails.
- Log module, operation type, operator, timestamp
- Log request parameters and response results
- Filter by module, type, status, and time range
FastBee Scenarios
- Trace who modified a product's thing model
- View who sent device commands
- Investigate device configuration changes
Login Log
Record all login activities:
- Login IP, browser, OS information
- Login status (success / failure)
- Failure reasons (wrong password, locked account, captcha error)
Online Users
View currently active system users:
- Check user login IP and time
- Force logout specific user sessions (for emergency security scenarios)
System Monitoring
Server Monitor
- CPU, memory usage
- JVM heap, thread information
- Disk usage and GC statistics
Cache Monitor
- Redis cache info and key statistics
- Cache command execution stats
- Cache hit rate analysis
Connection Pool Monitor
- Database connection pool status
- Active and idle connection counts
- SQL execution statistics
Announcements
Publish system notifications and announcements:
| Type | Description | Example |
|---|---|---|
| Notification | Regular message | System upgrade, feature changes |
| Announcement | Important message | Maintenance notice, service suspension |
Scheduled Tasks
Manage task scheduling online without code changes or service restarts:
- Add / modify / delete scheduled tasks
- Cron expression for execution timing
- View task execution results and logs
- Support immediate execution, pause / resume
FastBee Scenarios
- Periodic cleanup of expired device logs
- Periodic device online status check with alert triggers
- Periodic statistics report generation
Code Generator (Dev Tool)
Auto-generate frontend and backend code from database table structures:
- Generate Java Entity, Mapper, Service, Controller
- Generate Vue pages (list, form, detail)
- Generate SQL menu scripts
- Support single table, tree table, and master-detail templates
System API
Auto-generate REST API documentation via Swagger for frontend integration and third-party access. URL: http://server-ip/swagger-ui.html
