diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..8238846bd370f3fd5ac99bd0b5d488de21d67ea7 --- /dev/null +++ b/README.en.md @@ -0,0 +1,60 @@ + + +# Binance Chain Tools + +This is a collection of tools for interacting with Binance Chain. + +## Tools + +### 1. Binance Chain Explorer + +The Binance Chain Explorer can be used to query all data on Binance Chain, including but not limited to block information, transaction information, wallet address balances, and smart contract details. + +- [Binance Chain Explorer](https://explorer.binance.org.cn/) + +### 2. Binance Chain Node + +A Binance Chain node can synchronize all data on Binance Chain and provide RPC services to support application interaction with the blockchain. + +- [Binance Chain Node Documentation](https://docs.binance.org/guides/node/) + +### 3. Binance Chain Wallet + +Binance Chain wallets are used to store Binance Chain assets and interact with decentralized applications (DApps). + +- [Binance Chain Wallet Documentation](https://docs.binance.org/guides/wallet/) + +### 4. Binance Chain CLI + +Binance Chain CLI is a command-line tool that allows developers to interact with Binance Chain via terminal commands. + +- [Binance Chain CLI Documentation](https://docs.binance.org/guides/cli/) + +## Development Tools + +### 1. Binance Chain SDK + +The Binance Chain SDK provides a series of APIs for developers to build applications based on Binance Chain. + +- [Binance Chain SDK Documentation](https://docs.binance.org/guides/sdk/) + +### 2. Binance Chain API + +The Binance Chain API provides a set of standard interfaces for interacting with Binance Chain, including querying blockchain data and sending transactions. + +- [Binance Chain API Documentation](https://docs.binance.org/guides/api/) + +## Community + +If you have any questions or suggestions, feel free to join the Binance Chain community for discussions. + +- [Binance Chain Forum](https://community.binance.org.cn/) +- [Binance Chain GitHub](https://github.com/binance-chain) + +## License + +This project is licensed under the Apache License, Version 2.0. + +## Contact Us + +For more information about Binance Chain, please visit the [official website](https://binance.org). If you encounter technical issues, please submit them on [GitHub Issues](https://github.com/binance-chain/issues). \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2923f76c2f1b563561754c546385eb249cc591a0 --- /dev/null +++ b/README.md @@ -0,0 +1,106 @@ +# Code Template MyPlus + +这是一个基于 Java 的代码生成工具,旨在为 MyPlus 项目提供快速开发支持。该工具集成了多种构建器,可自动生成 Controller、Service、DAO、Entity、VO、Vue 等代码结构,适用于基于条件查询、分页、新增、修改、删除等常见业务场景。 + +--- + +## 📌 功能特性 + +- **代码生成器**:支持根据数据模型自动生成各类代码文件。 +- **多层架构支持**:涵盖 Controller、Service、DAO、Mapper XML、VO、POJO、Vue 等组件。 +- **模板引擎**:使用 FreeMarker 模板引擎进行代码生成。 +- **基础接口模板**: + - 条件分页查询 + - 条件不分页导出(支持动态表头) + - 根据主键 ID 查询 + - 新增、修改、删除(支持批量操作) + +--- + +## 🧱 技术架构 + +本项目基于 Spring Boot 框架,使用 MyBatis 作为 ORM 框架,并结合 FreeMarker 模板引擎实现代码生成。项目结构清晰,模块化设计便于扩展和维护。 + +--- + +## 🛠️ 使用说明 + +### 1. 环境准备 + +- Java 1.8 或以上版本 +- Maven 3.x +- Spring Boot 2.x +- MyBatis 及其相关依赖 + +### 2. 配置参数 + +在 `application.yml` 或 `datasource.properties` 中配置数据库连接信息。 + +### 3. 代码生成流程 + +1. **定义数据模型**:通过 `ModelInfo` 类定义字段类型、名称、描述等信息。 +2. **构建数据模型 Map**:将模型信息封装为 `Map`。 +3. **调用构建器**:使用 `BuilderFactory` 或具体构建器类(如 `ControllerBuilder`, `ServiceBuilder` 等)生成代码。 + +示例: + +```java +Map modelMap = new HashMap<>(); +modelMap.put("packageName", "com.zyg.code"); +modelMap.put("modelName", "User"); +modelMap.put("fields", Arrays.asList( + new ModelInfo("String", "name", "姓名", true, "user_name", "id"), + new ModelInfo("Integer", "age", "年龄", false, "user_age", "") +)); + +ControllerBuilder.builder(modelMap); +ServiceBuilder.builder(modelMap); +DaoBuilder.builder(modelMap); +``` + +--- + +## 📁 项目结构说明 + +- `BuilderFactory`:统一入口,用于调用各类构建器。 +- `TemplateBuilder`:模板加载与配置中心。 +- `ControllerBuilder` / `ServiceBuilder` / `DaoBuilder`:分别用于生成 Controller、Service、DAO 层代码。 +- `PojoBuilder` / `EntityVOBuilder`:用于生成实体类和 VO 类。 +- `VueBuilder`:用于生成 Vue 前端组件。 +- `TemplateUtil`:模板处理工具类。 +- `StringUtils` / `UpAndLowerUtils`:字符串与命名格式转换工具类。 +- `ModelInfo`:字段信息封装类,用于描述模型字段属性。 + +--- + +## 📦 依赖管理 + +使用 Maven 进行依赖管理,核心依赖包括: + +- Spring Boot Starter Web +- MyBatis +- FreeMarker +- Lombok +- Swagger(可选) + +--- + +## 📜 许可证 + +本项目采用 [MIT License](https://opensource.org/licenses/MIT),请在使用时保留原始版权信息。 + +--- + +## 🤝 贡献指南 + +欢迎提交 Issue 和 Pull Request。请遵循以下规范: + +- 提交前确保代码风格一致。 +- 添加必要的单元测试。 +- 更新文档以反映新功能或变更。 + +--- + +## 📞 联系方式 + +如有问题或建议,请联系项目维护者或提交 Issue。 \ No newline at end of file