# item-demo **Repository Path**: capper/item-demo ## Basic Information - **Project Name**: item-demo - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-23 - **Last Updated**: 2026-01-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 华一运营系统 - huayi-operation # 目录 > 1、项目 > 2、技术栈 > x、状态码解释 # 1、项目 后端项目,目前的项目结构如下: ```Java [-]xxx ├──[-]xxx-application // 提供对外 HTTP API 。 ├──[-]xxx-entity // 提供领域模型实体类 。 ├──[-]xxx-service-api // 提供 Dubbo 服务 API 。 ├──[-]xxx-service-impl // 提供 Dubbo 服务 Service 实现。 ``` 考虑拆分过细过多 JVM 带来的服务器成本。所以目前的设定是: * `xxx-service-impl` 和 `xxx-entity` 内嵌在 `xxx-application` 中运行。 * MQ 消费者、定时器执行器,内嵌在 `xxx-service-impl` 中运行。 也就是说,一个 `xxx-application` 启动后,该模块就完整启动了。 # 2、技术栈 | 框架 | 说明 | 版本 | |-----------------------------------------------------------|----------------|---------------| | [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.3.1 | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 8.0.20 | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.1.22 | | [MyBatis](http://www.mybatis.org/mybatis-3/zh/index.html) | 数据持久层框架 | 3.5.5 | | [MyBatis-Plus](https://mp.baomidou.com/) | Mybatis 增强工具包 | 3.3.2 | | [Redis](https://redis.io/) | key-value 数据库 | 2.3.2.RELEASE | | [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.13.3 | | [Elasticsearch](https://www.elastic.co/cn/) | 分布式搜索引擎 | 7.1.1 | | [Dubbo](http://dubbo.apache.org/) | 分布式 RPC 服务框架 | 2.7.7 | | [RocketMQ](http://rocketmq.apache.org/) | 消息中间件 | 2.1.1 | | [Seata](https://github.com/seata/seata) | 分布式事务中间件 | 即将引入 | | [Nacos](https://nacos.io/) | 分布式系统协调 作为注册中心 | 1.3.0 | | [XXL-Job](http://www.xuxueli.com/xxl-job/) | 分布式任务调度平台 | 2.2.0 | | [Knife4j](https://doc.xiaominfo.com/) | API 文档 | 3.0.2 | 即将引入 * [ ] 配置中心 Apollo * [ ] 服务保障 Sentinel * [ ] 网关 Soul * [ ] 链路监控 Skywalking # x、状态码解释 如:1001001001 1 001 001 001 > 第一段:1位 类型 1 - 业务级别异常 2 - 系统级别异常 > 第二段:3位 系统模块 001 - CRM客户模块(crm-customer) 002 - CRM订单模块(crm-order) 003 - CRM产品模块(crm-product) ... - ... > 第三段:3位 业务模块 一般每个系统里面,往往会存在多个模块,用于区分业务模块,如: 001 - 客户公司 002 - 客户人员 003 - 客户跟进 > 第四段:3位 错误码(建议每个模块递增) 不限制规则使用,一般建议,每个模块递增 VO 视图展示对象(controller返回值) BO 业务层传输展示层对象(service-api返回值) DTO 展示层传输业务层对象(service-api接收参数) PO 展示层接收对象(controller接口接收参数) DO 数据库传输业务层对象(数据库实体类)(do为关键字,使用dataobject) 考虑: 1、增加sys-mongo芒果模块 2、增加sys-log日志模块 将核心业务update的做日志存储,目前考虑存储在MongoDB中,后续可用于记录操作和回滚操作。