# Meiey11 **Repository Path**: hakin-shc/Meiey11 ## Basic Information - **Project Name**: Meiey11 - **Description**: 美业行业后台管理系统: 功能包括:系统用户管理、会员管理、会员充值、会员充次、金额消费、次卡消费、成本管理、营收分析 功能持续开发中,欢迎各位大佬一起参与进来一起完善。 - **Primary Language**: Java - **License**: 0BSD - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 2 - **Created**: 2021-09-14 - **Last Updated**: 2026-09-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: 美业 ## README # Meiey11
## Project Introduction **Meiey11** is a lightweight backend management system specifically designed for the beauty industry. It adopts a traditional monolithic architecture design, allowing quick setup and use without complex frontend-backend separation deployment. The system covers core functionalities needed for daily operations of beauty stores, helping merchants achieve digital management. > **Project Tagline**: Making beauty industry management simpler and more efficient --- ## Features / Main Characteristics ### ✨ Implemented Features | Module | Function | Description | |--------|----------|-------------| | **System Management** | User Management | System account creation, password modification, permission management | | **Member Management** | Member Profile | Member information entry, editing, querying | | **Member Recharge** | Value Recharge | Stored-value card recharge, recharge history query | | **Member Times Package** | Package Management | Service times purchase, usage deduction records | | **Consumption Management** | Value Consumption | Deduction from stored-value card, consumption transaction records | | | Times Consumption | Service times redemption from package, consumption details | | **Cost Management** | Cost Entry | Store daily expense recording and statistics | | **Report Analysis** | Revenue Analysis | Revenue and expenditure data visualization, business reports | ### 🎯 Core Characteristics - **Lightweight Architecture**: Monolithic application design, simple deployment, low maintenance cost - **Quick Onboarding**: Intuitive functional interface, operation flow aligns with daily store habits - **Data Visualization**: Integrated ECharts charts, revenue data at a glance - **Access Control**: Security authentication system based on Spring Security - **API Documentation**: Integrated Knife4j, auto-generated online API documentation --- ## Applicable Scenarios - 💈 **Hair & Beauty Salons** - Member management, service consumption, staff commission - 💅 **Nail Salons** - Stored-value card management, package redemption - 🏥 **Medical Aesthetic Clinics** - Customer profiles, consumption records - 🛀 **Wellness SPA Centers** - Package management, revenue statistics --- ## Technology Stack ### Backend Technologies | Technology | Version | Purpose | |------------|---------|---------| | [Java](https://www.oracle.com/java/) | 17 | Programming Language | | [Spring Boot](https://spring.io/projects/spring-boot) | 3.2.1 | Application Framework | | [Spring Security](https://spring.io/projects/spring-security) | 6.x | Security Authentication | | [OAuth2 Authorization Server](https://spring.io/projects/spring-authorization-server) | - | Authorization Server | | [MyBatis](https://mybatis.org/mybatis-3/) | 3.0.2 | ORM Framework | | [Mapper](https://github.com/abel533/Mapper) | 4.2.2 | MyBatis Enhancement Tool | | [PageHelper](https://pagehelper.github.io/) | 1.4.6 | Pagination Plugin | | [Druid](https://github.com/alibaba/druid) | 1.2.12 | Database Connection Pool | | [MySQL](https://www.mysql.com/) | 8.0.28 | Database | | [Knife4j](https://doc.xiaominfo.com/) | 4.3.0 | API Documentation | | [Hutool](https://hutool.cn/) | 5.8.25 | Java Utility Library | | [Lombok](https://projectlombok.org/) | - | Code Simplification Annotations | ### Frontend Technologies | Technology | Description | |------------|-------------| | [Thymeleaf](https://www.thymeleaf.org/) | Template Engine | | [Layui](https://layui.dev/) | Frontend UI Component Library | | [jQuery](https://jquery.com/) | JavaScript Library | | [ECharts](https://echarts.apache.org/) | Data Visualization Chart Library | ### Build Tools - **Maven** - Project Build and Dependency Management --- ## Environmental Dependencies ### System Requirements | Software | Required Version | Description | |----------|------------------|-------------| | **JDK** | >= 17 | Spring Boot 3.x requires Java 17+ | | **MySQL** | >= 8.0 | Recommended 8.0.28 and above | | **Maven** | >= 3.6 | Project Build Tool | ### Recommended Development Environment - **OS**: Windows 10+ / macOS 10.14+ / Linux (Ubuntu 20.04+) - **IDE**: IntelliJ IDEA 2022+ / Eclipse 2022+ - **Browser**: Chrome 90+ / Edge 90+ / Firefox 88+ --- ## Quick Installation and Deployment ### Step 1: Get the Code ```bash # Gitee git clone https://gitee.com/your-username/meiey11.git # Or download ZIP package and extract ``` ### Step 2: Initialize Database 1. Create database ```sql CREATE DATABASE crm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ``` 2. Execute SQL scripts (path: `src/main/resources/static/db/`) ```bash # Execute in order crm.sql # Core table structures t_consumption_times.sql # Consumption times related tables t_cost.sql # Cost table t_recharge_times.sql # Recharge times table ``` ### Step 3: Configure Database Connection Modify database connection information in the configuration file [application.yml](file:///d:/Work/VueSpace/Meiey11-2/src/main/resources/application.yml): ```yaml spring: datasource: url: jdbc:mysql://localhost:3306/crm?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT username: root # Change to your database username password: root # Change to your database password ``` ### Step 4: Start the Project #### Method 1: Maven Command ```bash cd Meiey11-2 mvn clean install mvn spring-boot:run ``` #### Method 2: IDE Run Find the main class `cn.meye11.crm.Meye11Application` in IDE, and run the main method directly. --- ## Startup / Run Commands ### Common Commands ```bash # Compile project mvn clean compile # Package project (skip tests) mvn clean package -DskipTests # Run project mvn spring-boot:run # Run with specific profile mvn spring-boot:run -Dspring.profiles.active=prod # Run tests mvn test ``` ### Jar Package Execution ```bash # After packaging, jar file is generated in target directory java -jar target/Meye11-0.0.1-SNAPSHOT.jar # Background run (Linux) nohup java -jar Meye11-0.0.1-SNAPSHOT.jar > app.log 2>&1 & ``` ### Access URLs | URL | Description | |-----|-------------| | http://localhost:8988 | Project Homepage | | http://localhost:8988/login | Login Page | | http://localhost:8988/doc.html | Knife4j API Documentation | | http://localhost:8988/druid | Druid Monitoring Dashboard (Account: root / Password: 123456) | --- ## Basic Usage Examples ### 1. User Login 1. Visit: http://localhost:8988/login 2. Enter username and password to login 3. After entering homepage, functional menu navigation is visible ### 2. Member Management Operations ``` Member Management → Member List → Add Member ├── Fill in basic member info (name, phone, gender, etc.) ├── Queryable in list after saving └── Click action bar for edit/recharge/consumption ``` ### 3. Recharge Operations ``` Member List → Select Member → Recharge ├── Value Recharge: Enter recharge amount, stored-value balance increases after confirmation └── Times Package: Select service item, purchase times ``` ### 4. Consumption Operations ``` Member List → Select Member → Consumption ├── Value Consumption: Deduct consumption amount from stored-value card └── Times Consumption: Redeem service times from purchased package ``` --- ## Configuration File Explanation ### Core application.yml Configuration Details #### 1. Service Configuration ```yaml server: port: 8988 # Service port, default 8988 ``` #### 2. Template Engine Configuration ```yaml spring: thymeleaf: cache: false # Disable cache in development, recommended to enable in production mode: HTML encoding: UTF-8 servlet.content-type: text/html ``` #### 3. Database Configuration ```yaml spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/crm?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT username: root password: root druid: initial-size: 5 # Initial connection pool size max-active: 20 # Max active connections max-wait: 60000 # Max wait time (ms) min-idle: 5 # Min idle connections validation-query: SELECT 1 # Connection validation SQL stat-view-servlet: enabled: true login-username: root # Druid monitoring account login-password: 123456 # Druid monitoring password reset-enable: true ``` #### 4. MyBatis Configuration ```yaml mybatis: type-handlers-package: cn.meye11.crm.common.mybatis.handler configuration: map-underscore-to-camel-case: true # Underscore to camelCase cache-enabled: false # Enable/disable L2 cache ``` #### 5. PageHelper Configuration ```yaml pagehelper: helper-dialect: postgresql # Note: This config is postgresql, change to mysql if using MySQL reasonable: true support-methods-arguments: true params: count=countSql ``` #### 6. Mapper Security Configuration ```yaml mapper: safe-delete: true # Safe delete: Prevent full table delete safe-update: true # Safe update: Prevent full table update ``` #### 7. Log Configuration ```yaml logging: level: cn.meye11: debug # Project log level: trace/debug/info/warn/error ``` --- ## Directory Structure ``` Meiey11-2/ ├── src/ │ ├── main/ │ │ ├── java/cn/meye11/crm/ │ │ │ ├── Meye11Application.java # Application Startup Class │ │ │ ├── common/ # Common Module │ │ │ │ ├── mybatis/ # MyBatis Extensions │ │ │ │ ├── RestResponse.java # Unified Response Wrapper │ │ │ │ ├── Page.java # Pagination Object │ │ │ │ └── ... │ │ │ ├── config/ # Config Classes (Security, OAuth2, etc.) │ │ │ ├── configuration/ # DataSource, Global DateTime Config │ │ │ ├── controller/ # Controller Layer (API Endpoints) │ │ │ ├── domain/ # Data Models │ │ │ │ ├── entity/ # Entity Classes │ │ │ │ ├── model/ # Business Models │ │ │ │ └── query/ # Query Objects │ │ │ ├── mapper/ # MyBatis Mapper Interfaces │ │ │ ├── security/ # Security Authentication Related │ │ │ └── service/ # Business Service Layer │ │ └── resources/ │ │ ├── static/ # Static Resources │ │ │ ├── db/ # Database SQL Scripts │ │ │ ├── img/ # Image Resources │ │ │ ├── js/ # JavaScript Files │ │ │ ├── layui/ # Layui Framework Resources │ │ │ └── echarts/ # ECharts Chart Library │ │ ├── templates/ # Thymeleaf Template Pages │ │ │ ├── index.html # Homepage │ │ │ ├── login.html # Login Page │ │ │ ├── gomro-login.html # Gomro Login Page │ │ │ ├── dashboard/index.html # Dashboard │ │ │ ├── user/user.html # User Management Page │ │ │ ├── member/ # Member Related Pages │ │ │ ├── item/ # Item Management │ │ │ ├── report/ # Report Pages │ │ │ └── statistical_analysis/ # Statistical Analysis │ │ └── application.yml # Main Configuration File │ └── test/ │ └── java/ # Test Code ├── deploy/ # Deployment Related │ └── static/ # Static Resources Backup │ └── Meye11-0.0.1-SNAPSHOT.jar # Packaged Jar File ├── .mvn/ ├── .gitee/ # Gitee Templates ├── .codebuddy/ ├── pom.xml # Maven Dependency Config ├── Dockerfile # Docker Image Build ├── docker-compose.yml # Docker Compose Config ├── .gitignore ├── LICENSE ├── README.en.md └── README.md # This Document ``` ### Module Responsibilities | Directory | Responsibility | |-----------|----------------| | **controller** | HTTP endpoint definitions and parameter handling | | **service** | Core business logic implementation | | **mapper** | Database operations (SQL queries/updates) | | **domain/model** | DTO Data Transfer Objects | | **domain/entity** | DB Entity Classes | | **common** | Utilities, constants, exceptions, etc. | | **config** | Spring/Security configuration classes | --- ## FAQ ### Q1: Startup Error "java.lang.UnsupportedClassVersionError" **A**: Spring Boot 3.x requires Java 17 or higher. Please check: ```bash # Check current Java version java -version # Should show java version "17.x.x" or higher ``` ### Q2: Database Connection Failed **A**: Please troubleshoot as follows: 1. Is MySQL service running normally? 2. Check IP, port, username, password are correct 3. Confirm database `crm` is created 4. Verify timezone config in JDBC URL: `serverTimezone=GMT` or `serverTimezone=Asia/Shanghai` ### Q3: Page Access 404 / Style Missing **A**: Could be static resource path issue, please check: 1. Is `src/main/resources/static` directory marked as Resources Root in IDE? 2. Re-run `mvn clean compile` to ensure static resources are properly copied 3. Clear browser cache or retry in incognito mode ### Q4: Druid Monitoring Page Not Accessible **A**: When visiting http://localhost:8988/druid: - Verify `stat-view-servlet.enabled: true` in config - Default account: `root`, password: `123456` ### Q5: How to Change Default Port? **A**: Modify in `application.yml`: ```yaml server: port: 8080 # Change to your desired port ``` ### Q6: API Documentation (Knife4j) Not Showing **A**: Visit http://localhost:8988/doc.html to troubleshoot: - Verify no Knife4j related errors in startup logs - Ensure Spring Security whitelists `/doc.html`, `/v3/api-docs/**`, etc. ### Q7: What's the Default Login Account? **A**: Check inserted user data in initialization SQL scripts, typically: - Username: `admin` - Password: `admin` or `123456` ### Q8: Garbled Characters After Deployment to Linux **A**: JVM lacks Chinese font support, install fonts: ```bash # CentOS yum install dejavu-sans-fonts fontconfig fc-cache --force # Ubuntu apt-get install fonts-dejavu fontconfig fc-cache --force ``` --- ## CHANGELOG ### v0.0.1-SNAPSHOT (2023-11-16 ~ now) #### ✨ New Features - `feat`: System user management module (User CRUD, password modification) - `feat`: Member profile management (Member info entry, editing, querying) - `feat`: Member value recharge and consumption module - `feat`: Member times package recharge and consumption - `feat`: Cost management module - `feat`: Revenue statistical analysis and chart display - `feat`: Integrated Spring Security authentication - `feat`: Integrated Knife4j online API documentation - `feat`: Integrated Druid connection pool monitoring - `feat`: Gomro system SSO integration #### 🛠️ Improvements - `chore`: Spring Boot version upgraded to 3.2.1 - `chore`: MySQL driver upgraded to 8.0.28 - `refactor`: Unified response wrapper RestResponse - `refactor`: Unified pagination wrapper Page object #### 📝 Documentation - `docs`: Improved README usage guide - `docs`: Added database initialization scripts --- ## Open Source License This project uses **MIT License** - see [LICENSE](file:///d:/Work/VueSpace/Meiey11-2/LICENSE) for details ``` Copyright (c) 2021 沈垚鑫 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ``` --- ## Contribution Guidelines We warmly welcome community developers to contribute code to the Meiey11 project! Before submitting your contribution, please read the following guidelines. ### 🔖 Commit Message Convention Git commit message format: ```