You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4 lines
588 B
4 lines
588 B
|
1 month ago
|
- 所有 Service 实现类继承 `BaseServiceImpl<SysXxxMapper, SysXxx>` 并实现对应 `ISysXxxService` 接口,复用 MyBatis-Plus 的通用 CRUD。
|
||
|
|
- 业务异常统一通过抛出 `BusinessErrorException` 并传入 `AuthConstants` 中定义的编码常量来传递错误码与消息。
|
||
|
|
- 涉及写操作的方法使用 `@Transactional(rollbackFor = Exception.class)` 保证事务回滚,并在修改后调用缓存的 `invalidate()` 方法使部门树缓存失效。
|
||
|
|
- 构造器注入通过 Lombok `@RequiredArgsConstructor` 完成,Service 内部依赖以 `final` 字段声明。
|