feat(task): TransportTaskService 扩展 RPC 创建方法(TDD)

- 新增 TransportTaskService.createTransportTaskByRpc() 接口方法
- 实现幂等检查(同 bizType+bizId 下未完结任务返回已有任务ID)
- 参数完整时状态置为待下发(040),否则生成(010)
- 添加单元测试覆盖正常创建和幂等返回两种场景
- 添加服务器模块测试依赖(JUnit 5, Mockito, AssertJ)
- 将 DTO 移至正确的 Maven 子模块位置
This commit is contained in:
2026-07-14 17:35:04 +08:00
parent 5684575abe
commit c6dffbcb61
10 changed files with 393 additions and 0 deletions

View File

@@ -115,6 +115,33 @@
<groupId>cn.nl.cloud</groupId>
<artifactId>nl-spring-boot-starter-monitor</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>