- 10张数据表 DDL(vehicle/licence/insurance/equipment/ext/driver/device/type/model) - 75个Java文件:DO/VO/Mapper/Service/Controller 完整实现 - AssetServerApplication 独立微服务启动类(端口48084) - 车辆状态机、VIN/车牌唯一性校验、合同占用校验 - 导入/导出 Excel 功能 - 编译通过
1.0 KiB
1.0 KiB
OneOS V5 Backend
技术栈
- yudao-cloud 框架,JDK 17,Spring Boot 3.2,MyBatis-Plus
- 包前缀: cn.iocoder.yudao.module
- DO 基类: TenantBaseDO
构建命令
# 编译 asset 模块(独立微服务)
mvn clean package -pl yudao-module-asset/yudao-module-asset-server -am -DskipTests
模块结构
业务模块: yudao-module-asset/
- yudao-module-asset-api: 对外 API + 枚举 + ErrorCode
- yudao-module-asset-server: 独立微服务,有自己的 Application 启动类
⚠️ 重要:独立微服务部署
- asset-server 是独立微服务,不挂在 system-server 下
- 需要自己的 AssetServerApplication 启动类
- 需要自己的 application.yaml(端口 48084)
- 需要 Nacos 服务注册
- Gateway 需要添加 asset-server 路由
代码规范
- Controller: @RestController + @Validated, 路径 /admin-api/asset/xxx
- 返回: CommonResult
- Service: 接口 + Impl 分离
- Mapper: 继承 BaseMapperX
- DO: @TableName + @KeySequence, 继承 TenantBaseDO
- 分页: PageResult
- 导出: @ExcelProperty