Based on the latest RuoyiPlus backend architecture, 75 DOs / 54 Controllers, menu ID starting at 2000, providing deep business enhancements for full customer lifecycle management, intelligent permission control, and audit compliance
1. Enhancement Positioning and Architecture
1.1 Product Positioning
RuoYiPlus CRM builds on Yudao’s native capabilities, providing enterprise-level enhancements around three core areas: customer asset control, sales process automation, and data permission compliance, creating a complete business loop from lead acquisition to customer success.
graph TB
subgraph "RuoYiPlus CRM Enhancement Architecture"
subgraph "Business Layer"
A1[Customer Full Lifecycle]
A2[Opportunity Management]
A3[Contract Management]
A4[Marketing Automation]
end
subgraph "Capability Layer"
B1[Intelligent Public Pool]
B2[Sales Forecasting]
B3[E-Signing]
B4[BI Analytics]
end
subgraph "Infrastructure Layer"
C1[Data Permission Engine]
C2[Operation Audit]
C3[Sensitive Data Masking]
C4[Multi-Tenancy Isolation]
end
end
A1 --> B1
A2 --> B2
A3 --> B3
A4 --> B4
B1 --> C1
B2 --> C2
B3 --> C3
B4 --> C4
1.2 Module Scale
| Metric | Value |
|---|
| Data Objects (DO) | 75 |
| Controllers | 54 |
| Menu ID Start | 2000 |
| Maven Module | yudao-module-crm |
1.3 Core Data Tables
| Table Name | Description |
|---|
crm_customer | Customer basic info |
crm_contact | Contact info |
crm_business | Opportunity management |
crm_contract | Contract management |
crm_quote | Quotation management |
crm_invoice | Invoice management |
crm_receivable | Receivables management |
crm_return_visit | Customer return visit |
crm_product | Product management |
crm_event | Event management |
crm_marketing_campaign | Marketing campaigns |
crm_survey | Survey management |
crm_approval_flow | Approval workflow |
crm_file | File management |
crm_permission | Data permissions |
1.4 Capability Comparison
| Dimension | Yudao Native CRM | RuoYiPlus CRM Enhancement |
|---|
| Customer Management | Basic customer info | Full lifecycle management |
| Public Pool | Simple public pool | Intelligent recycling + allocation strategy |
| Opportunity Management | Basic opportunities | Kanban + forecasting + automation |
| Contract Management | Basic contracts | E-signing + fulfillment tracking |
| Data Analytics | Simple reports | BI intelligent analysis |
| Marketing Automation | None | Marketing automation engine |
| Permission Control | Basic RBAC | Four-layer data permissions |
| Audit Compliance | Operation logs | Full-chain audit trail |
2. Customer Full Lifecycle Management
2.1 Lifecycle Stages
graph LR
A[Prospect Stage] --> B[New Customer Stage]
B --> C[Active Stage]
C --> D[Mature Stage]
D --> E[Churn Stage]
A --> A1[Lead Acquisition]
A --> A2[Lead Cleansing]
A --> A3[Lead Scoring]
A --> A4[Customer Profiling]
B --> B1[Customer Tiering]
B --> B2[Initial Follow-up]
B --> B3[Need Discovery]
B --> B4[Opportunity Creation]
C --> C1[Continuous Follow-up]
C --> C2[Opportunity Advancement]
C --> C3[Contract Signing]
C --> C4[Payment Collection]
D --> D1[Upsell Discovery]
D --> D2[Renewal Reminder]
D --> D3[Service Upgrade]
D --> D4[Satisfaction Survey]
E --> E1[Churn Alert]
E --> E2[Retention Strategy]
E --> E3[Churn Analysis]
E --> E4[Public Pool Recycling]
2.2 Data Permission Control
The CRM system implements a four-layer data permission model to ensure strict isolation of customer data based on organizational structure and job responsibilities.
graph TB
subgraph "Permission Decision Engine"
A[Sales Request] --> B[Permission Resolution]
B --> C{Permission Source}
C --> D[User-Level Permission]
C --> E[Role-Level Permission]
C --> F[Position-Level Permission]
C --> G[Department-Level Permission]
D --> H[Permission Merge]
E --> H
F --> H
G --> H
H --> I[Customer Level Filter]
I --> J[Data Filter SQL]
J --> K[Return Results]
end
| Permission Level | Use Case | Example |
|---|
| User-Level | Sales person’s own customers | Sales person can only view their own customers |
| Role-Level | Sales team | Sales manager can view all team customers |
| Position-Level | Regional management | Regional director can view all customers in their region |
| Department-Level | Branch office | Branch GM can view all branch customers |
// CRM data permission example
@DataPermission(roles = {"sales_manager"})
public class CustomerServiceImpl {
// Sales manager can view team customers
// Automatically filters data by department hierarchy
}
// Customer level filter
@DataPermission(scope = "custom",
sqlFilter = "customer_level <= #{currentUser.maxLevel}")
public class CustomerLevelService {
// Filter by customer levels accessible to the user
}
2.3 Operation Audit
All customer data operations record complete audit logs, supporting data change traceability and compliance audits.
graph TB
subgraph "Audit Event Collection"
A1[Customer Creation]
A2[Customer Edit]
A3[Customer Transfer]
A4[Customer Deletion]
A5[Data Export]
end
subgraph "Audit Processing"
B1[Change Comparison]
B2[Risk Scoring]
B3[Rule Matching]
end
subgraph "Audit Storage"
C1[Operation Log]
C2[Change History]
C3[Blockchain Evidence]
end
A1 --> B1
A2 --> B1
A3 --> B1
A4 --> B1
A5 --> B1
B1 --> B2
B2 --> B3
B3 --> C1
B3 --> C2
B3 --> C3
| Audit Type | Recorded Content | Retention Period |
|---|
| Operation Audit | Customer creation, edit, deletion, transfer | Permanent |
| Data Change | Before/after field values | 3 years |
| Export Audit | Export time, exporter, data volume | 3 years |
| Permission Change | Customer owner change history | Permanent |
3. Intelligent Public Pool
3.1 Public Pool Architecture
graph TB
subgraph "Public Pool Management"
A[Customer Enters Pool] --> B{Allocation Strategy}
B --> C[Allocate by Region]
B --> D[Allocate by Industry]
B --> E[Allocate by Capability]
C --> F[Sales Pickup]
D --> F
E --> F
F --> G{Follow-Up Rules}
G -->|N days no follow-up| H[Auto Recycle]
G -->|Normal follow-up| I[Continue Follow-Up]
H --> A
end
3.2 Core Capabilities
| Capability | Description |
|---|
| Auto Recycle Rules | Auto recycle after N days without follow-up |
| Pickup Limits | Daily pickup cap, total cap |
| Allocation Strategy | Intelligent allocation by region/industry/capability |
| Protection Mechanism | Key customer protection, follow-up exemption |
| Recycle Alert | Auto reminder 3 days before recycling |
3.3 Configuration Example
crm:
pool:
recycle-rules:
- name: "30 days no follow-up"
condition: "last_follow_days > 30"
action: "recycle"
exclude-levels: ["VIP", "KA"]
- name: "90 days no opportunity"
condition: "no_business_days > 90"
action: "recycle"
pickup-limits:
daily: 10
total: 50
cooldown-hours: 24
4. Opportunity Management and Forecasting
4.1 Opportunity Process
graph LR
A[Lead Conversion] --> B[Need Confirmation]
B --> C[Solution Development]
C --> D[Quotation & Negotiation]
D --> E[Win/Loss]
E --> F[Contract Signing]
B --> B1[Need Analysis]
B --> B2[Customer Evaluation]
C --> C1[Solution Design]
C --> C2[Solution Demo]
D --> D1[Quotation Approval]
D --> D2[Contract Negotiation]
4.2 Opportunity Kanban and Forecasting
| Capability | Description |
|---|
| Visual Kanban | Drag-and-drop opportunity stage management |
| Win Rate Prediction | Win rate model based on historical data |
| Sales Forecasting | Quarterly/annual sales revenue forecasting |
| Stage Conversion Rate | Conversion rate analysis per stage |
| Bottleneck Identification | Automatic conversion bottleneck identification |
5. Contract Management and E-Signing
5.1 Contract Process
graph TB
A[Contract Drafting] --> B[Contract Approval]
B --> C[E-Signing]
C --> D[Contract Execution]
D --> E[Contract Archiving]
A --> A1[Template-Based Drafting]
A --> A2[Clause Configuration]
B --> B1[Multi-Level Approval]
B --> B2[Legal Review]
C --> C1[Electronic Seal]
C --> C2[Identity Verification]
D --> D1[Fulfillment Tracking]
D --> D2[Payment Collection]
E --> E1[Electronic Archiving]
E --> E2[Expiry Reminder]
5.2 Contract Audit
All contract operations record complete audit logs, ensuring compliant and traceable contract management.
| Audit Item | Description |
|---|
| Contract Creation | Records drafter, drafting time |
| Contract Approval | Records approval process, approval comments |
| Contract Signing | Records signing time, signing parties |
| Contract Change | Records change content, change reason |
| Contract Archiving | Records archiving time, archiver |
6. Marketing Automation Engine
6.1 Automation Process
graph LR
A[Trigger Condition] --> B{Condition Check}
B -->|Satisfied| C[Execute Action]
B -->|Not Satisfied| D[No Action]
C --> E[Record Result]
E --> F{Follow-Up Condition}
F -->|Yes| G[Continue Execution]
F -->|No| H[Process End]
6.2 Automation Rule Example
// Automation rule example
AutomationRule {
trigger: "Customer Created"
conditions: [
"industry = 'Manufacturing'",
"region = 'East China'"
]
actions: [
"assignTo: 'East China Sales Team'",
"sendEmail: 'Welcome Email Template'",
"createTask: 'Initial Follow-Up Task'"
]
}
7. Data Analytics Enhancement
7.1 Sales Funnel Analysis
graph TB
A[Leads] --> B[Customers]
B --> C[Opportunities]
C --> D[Contracts]
D --> E[Collections]
A --> A1[Lead Conversion Rate]
B --> B1[Opportunity Creation Rate]
C --> C1[Stage Conversion Rate]
D --> D1[Win Rate]
E --> E1[Collection Completion Rate]
| Analysis Dimension | Metric |
|---|
| Lead → Customer | Lead conversion rate |
| Customer → Opportunity | Opportunity creation rate |
| Opportunity Stages | Stage conversion rate |
| Opportunity → Contract | Win rate |
| Contract → Collection | Collection completion rate |
7.2 Customer Value Analysis
| Analysis Model | Description |
|---|
| RFM Model | Recency, Frequency, Monetary analysis |
| Customer Tiering | VIP/KA/Normal/Potential customer tiers |
| Lifetime Value | CLV customer lifetime value prediction |
| Churn Risk Scoring | Churn probability prediction |
8. Technical Architecture
graph TB
subgraph "yudao-module-crm-plus"
subgraph "crm-biz"
A1[customer Customer Management]
A2[leads Lead Management]
A3[business Opportunity Management]
A4[contract Contract Management]
A5[pool Public Pool]
A6[automation Marketing Automation]
A7[analytics Data Analytics]
A8[integration External Integration]
end
subgraph "Permissions & Audit"
B1[permission Permission Control]
B2[audit Audit Logs]
B3[masking Data Masking]
end
end
A1 --> B1
A2 --> B1
A3 --> B1
A4 --> B2
A5 --> B2
A6 --> B3
A7 --> B3
9. Business Value
| Value Point | Description |
|---|
| Increase Conversion Rate | Intelligent follow-up reminders, opportunity forecasting |
| Reduce Churn Rate | Churn alert, retention strategy |
| Improve Efficiency | Marketing automation, mobile office |
| Data-Driven | BI analytics, decision support |
| Compliance Control | Four-layer permissions, full-chain audit |
| Data Security | Sensitive data masking, operation traceability |
docs