Files
starRiverProperty/docs/reviews/alibaba-audit-2026-04-24/09-maven-intelligent-cwoscomponent.md
2026-04-24 23:49:37 +08:00

27 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 09 `maven-intelligent-cwoscomponent` — 阿里巴巴规范走查(整理版)
**范围**`intelligent-cwoscomponent-rest`(约 96 个 Java+ `intelligent-cwoscomponent-interface`(约 166 个);**无**本模块内 `@Controller`。优先 **`*Impl*``*Feign*``Fallback`**。
## 问题清单(节选)
| 严重度 | 位置 | 类别 | 说明 | 建议 |
|--------|------|------|------|------|
| P0 | `RestSysettingAreaServiceImpl.java` | 条件装配 | `@ConditionalOnMissingClass` 指向 **resource** 包下 `SysettingAreaServiceImpl`,与 **sysetting** 域不一致 | 核对真实 Local 实现全限定名 |
| P0 | `AcsRecordThreeSendServiceImpl.java` | 条件装配 | 条件类写为 `AcsRecordServiceImpl`,与当前服务语义不符 | 改为正确实现类名 |
| P0 | `RestDeviceServiceImpl.java` | NPE | `deviceType.intValue()` 未防空;`getData()` / `Map` 链式未判空 | 判空与类型安全 |
| P1 | 各 `*FeignClientFallback` | 容错 | 普遍 `throw new RuntimeException(...)` | 返回约定失败 `CloudwalkResult` 或统一异常 + 日志 |
| P1 | `RestDeviceServiceImpl.java` | 泛型 | `(List)` / `(Map)` 原始类型强转 | 使用泛型 API |
| P2 | `PersonFeignClient.java` 等 | 命名 | `batchimport` 应为 `batchImport`(需契约同步) | 重命名 |
| P2 | 多数 `Rest*ServiceImpl` | 注入 | 字段 `@Autowired` | 推荐构造器注入 |
| P2 | `UserAcountDetailResult` 等 | 命名 | `Acount` 拼写 | 评估序列化兼容后修正 |
## 小结
| 级别 | 数量(约) |
|------|------------|
| P0 | 5 |
| P1 | 6 |
| P2 | 21 |
**优先**:修正 **`@ConditionalOnMissingClass`** 指向错误(易导致 Bean 装配与条件语义错误),以及 **`RestDeviceServiceImpl`** 空指针路径。