mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-24 23:41:21 +08:00
refactor(aop): 修改控制器切面切入点表达式并增加组织ID字段
- 将控制器切面的切入点表达式从 execution 改为 within,提高灵活性 - 在 SmartCamCarLicenseSnapshotDataService 中为 smartCamCarDataEntity 和 byNumber 实体添加 organizationId 字段
This commit is contained in:
@@ -66,7 +66,7 @@ public class ControllerAop {
|
||||
|
||||
@Autowired PojoProcessor pojoProcessor;
|
||||
|
||||
@Pointcut("execution (* cn.lihongjie.coal.*.controller.*.*(..))")
|
||||
@Pointcut("within (cn.lihongjie.coal..*.controller..*)")
|
||||
public void controllerMethods() {}
|
||||
|
||||
@SneakyThrows
|
||||
|
||||
@@ -326,6 +326,7 @@ public class SmartCamCarLicenseSnapshotDataService
|
||||
smartCamCarDataEntity.setEntry(entity);
|
||||
smartCamCarDataEntity.setEntryTime(entity.getInfoTimeObj());
|
||||
|
||||
smartCamCarDataEntity.setOrganizationId(entity.getOrganizationId());
|
||||
smartCamCarDataRepository.save(smartCamCarDataEntity);
|
||||
|
||||
} else {
|
||||
@@ -334,6 +335,7 @@ public class SmartCamCarLicenseSnapshotDataService
|
||||
smartCamCarDataEntity.setNumber(entity.getNumber());
|
||||
smartCamCarDataEntity.setExit(entity);
|
||||
smartCamCarDataEntity.setExitTime(entity.getInfoTimeObj());
|
||||
smartCamCarDataEntity.setOrganizationId(entity.getOrganizationId());
|
||||
smartCamCarDataRepository.save(smartCamCarDataEntity);
|
||||
}
|
||||
|
||||
@@ -348,6 +350,7 @@ public class SmartCamCarLicenseSnapshotDataService
|
||||
byNumber.setExit(entity);
|
||||
byNumber.setExitTime(entity.getInfoTimeObj());
|
||||
|
||||
byNumber.setOrganizationId(entity.getOrganizationId());
|
||||
smartCamCarDataRepository.save(byNumber);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user