diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..ad219458b9e53fd45132fa107e57a5dab400b7d2 --- /dev/null +++ b/README.en.md @@ -0,0 +1,110 @@ +# nw-java-boot + +This is a microservices base framework based on Spring Boot, suitable for building enterprise-level application systems. This project provides complete foundational functional modules required for enterprise applications, including user permission management, payment system, merchant management, tenant management, channel management, and configuration management. + +## Key Features + +- **Permission Management**: Provides a three-level permission system of roles, functions, and resources, supporting fine-grained permission control. +- **Payment System**: Integrates multiple payment methods such as WeChat Pay and Alipay, supporting complete payment processes including transactions, refunds, and reconciliation. +- **Multi-Tenant Architecture**: Supports tenant isolation and sharing, enabling rapid development of SaaS applications. +- **Channel Management**: Supports access through various channels, including H5, mini-programs, and mobile apps. +- **Configuration Center**: Provides flexible configuration management functionality with support for multi-level configurations. +- **User System**: Supports user logins across multiple channels, integrating various login methods such as WeChat and Alipay. + +## Module Descriptions + +### Authentication and Authorization Module (auth) +- Role Management: Supports definitions of different roles such as platform administrators and regular users. +- Function Management: Defines system function menus and permissions. +- Resource Management: Controls specific operational permissions. + +### Payment Module (pay) +- Merchant Management: Supports merchant configurations for multiple payment channels. +- Payment Transactions: Handles payment requests and callbacks. +- Refund Management: Supports transaction refunds and status queries. +- Payment Records: Records all payment transaction details. + +### User Module (user) +- User Management: Maintains basic user information. +- Address Management: Manages user shipping addresses. +- Login Credentials: Manages user login information across different channels. + +### Configuration Module (profile) +- Application Management: Defines various applications within the system. +- Channel Management: Configures access information for different channels. +- Tenant Management: Supports multi-tenant architecture. +- Dictionary Management: Maintains basic dictionary data for the system. +- File Upload: Supports image and other file upload functionalities. + +## Usage Instructions + +### API Documentation + +All APIs are documented using Swagger. You can access the API documentation via `/swagger-ui.html`. + +### API Call Examples + +#### User Login +```http +POST /service-user/user/login?channelId=123&param={"mobile":"13800001111","password":"123456"} +``` + +#### Create Payment +```http +POST /service-pay/pay +{ + "tenantId": 1, + "appId": 101, + "orderId": 1001, + "payType": "WX", + "payMethod": "WX_GZH", + "merchantId": 5001 +} +``` + +## Configuration Instructions + +The project uses `application.yml` for basic configuration. Main configuration items include: +- Database connection configuration +- File storage path +- Payment callback URL +- Cache configuration +- WeChat Pay-related configuration + +## Technology Stack + +- Spring Boot +- Spring Security +- Spring Data JPA +- Swagger +- Redis +- MySQL +- Lombok +- MapStruct + +## Directory Structure + +``` +src +├── main +│ ├── java +│ │ └── com +│ │ └── nengwei +│ │ └── boot +│ │ ├── constant # Constant definitions +│ │ ├── controller # API controllers +│ │ ├── dao # Data access layer +│ │ ├── entity # Database entities +│ │ ├── filter # Filters +│ │ ├── service # Business logic layer +│ │ │ └── impl # Business logic implementations +│ │ └── vo # Data transfer objects +│ └── resources +│ ├── application.yml # Configuration file +│ └── META-INF +│ └── spring # Spring Boot auto-configuration files +``` + +## License + +This project uses the MIT License. For details, please refer to the LICENSE file. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..08e9d455f2ef63e50a0948db184e53da2fe646df --- /dev/null +++ b/README.md @@ -0,0 +1,110 @@ +# nw-java-boot + +这是一个基于 Spring Boot 的微服务基础框架,适用于构建企业级应用系统。本项目提供了完整的用户权限管理、支付系统、商户管理、租户管理、渠道管理、配置管理等企业应用所需的基础功能模块。 + +## 功能特点 + +- **权限管理**:提供角色、功能、资源三级权限体系,支持细粒度权限控制 +- **支付系统**:集成微信、支付宝等多种支付方式,支持交易、退款、对账等完整支付流程 +- **多租户架构**:支持租户隔离和共享,可快速构建 SaaS 应用 +- **渠道管理**:支持多种渠道接入,包括 H5、小程序、APP 等 +- **配置中心**:提供灵活的配置管理功能,支持多层级配置 +- **用户体系**:支持多渠道用户登录,集成微信、支付宝等多种登录方式 + +## 模块说明 + +### 认证授权模块 (auth) +- 角色管理:支持平台管理员、普通用户等不同角色定义 +- 功能管理:定义系统功能菜单和权限 +- 资源管理:控制具体操作权限 + +### 支付模块 (pay) +- 商户管理:支持多种支付渠道的商户配置 +- 支付交易:处理支付请求和回调 +- 退款管理:支持交易退款和状态查询 +- 支付流水:记录所有支付交易明细 + +### 用户模块 (user) +- 用户管理:维护用户基本信息 +- 地址管理:用户收货地址管理 +- 登录凭证:管理不同渠道的用户登录信息 + +### 配置模块 (profile) +- 应用管理:定义系统中的各个应用 +- 渠道管理:配置不同渠道的接入信息 +- 租户管理:支持多租户架构 +- 字典管理:维护系统基础字典数据 +- 文件上传:支持图片等文件上传功能 + +## 使用说明 + +### 接口文档 + +所有接口都使用 Swagger 进行文档化,可通过 `/swagger-ui.html` 访问接口文档。 + +### 接口调用示例 + +#### 用户登录 +```http +POST /service-user/user/login?channelId=123¶m={"mobile":"13800001111","password":"123456"} +``` + +#### 创建支付 +```http +POST /service-pay/pay +{ + "tenantId": 1, + "appId": 101, + "orderId": 1001, + "payType": "WX", + "payMethod": "WX_GZH", + "merchantId": 5001 +} +``` + +## 配置说明 + +项目使用 `application.yml` 进行基础配置,主要配置项包括: +- 数据库连接配置 +- 文件存储路径 +- 支付回调地址 +- 缓存配置 +- 微信支付相关配置 + +## 技术栈 + +- Spring Boot +- Spring Security +- Spring Data JPA +- Swagger +- Redis +- MySQL +- Lombok +- MapStruct + +## 目录结构 + +``` +src +├── main +│ ├── java +│ │ └── com +│ │ └── nengwei +│ │ └── boot +│ │ ├── constant # 常量定义 +│ │ ├── controller # 接口控制器 +│ │ ├── dao # 数据访问层 +│ │ ├── entity # 数据库实体 +│ │ ├── filter # 过滤器 +│ │ ├── service # 业务逻辑层 +│ │ │ └── impl # 业务逻辑实现 +│ │ └── vo # 数据传输对象 +│ └── resources +│ ├── application.yml # 配置文件 +│ └── META-INF +│ └── spring # Spring Boot 自动配置文件 +``` + +## 许可证 + +本项目采用 MIT 许可证,详细请参见 LICENSE 文件。 \ No newline at end of file