mirror of https://gitee.com/stylefeng/roses
【8.0】【org】编辑公司删除缓存,修复event发布器的问题
parent
5983c18767
commit
3332890113
|
@ -56,7 +56,7 @@ public class BusinessEventPublisher {
|
|||
// 如果方法的参数数量为0,则直接调用,如果不为0,则跳过执行下个
|
||||
if (parameterClassType == null) {
|
||||
try {
|
||||
listenerMethod.invoke(businessObject);
|
||||
listenerMethod.invoke(bean);
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
log.error("方法调用失败,反射调用异常", e);
|
||||
throw new ServiceException(EventExceptionEnum.ERROR_INVOKE);
|
||||
|
|
|
@ -47,13 +47,12 @@ public class OrgOperateListener {
|
|||
* @since 2023/7/14 18:40
|
||||
*/
|
||||
@BusinessListener(businessCode = OrgConstants.EDIT_ORG_EVENT)
|
||||
public void editOrgCallback(HrOrganization businessObject) {
|
||||
if (ObjectUtil.isNotEmpty(businessObject.getOrgId())) {
|
||||
sysOrgSubFlagCache.remove(String.valueOf(businessObject.getOrgId()));
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(businessObject.getOrgParentId())) {
|
||||
sysOrgSubFlagCache.remove(String.valueOf(businessObject.getOrgParentId()));
|
||||
}
|
||||
public void editOrgCallback() {
|
||||
// 获取所有主键
|
||||
Collection<String> allKeys = sysOrgSubFlagCache.getAllKeys();
|
||||
|
||||
// 删除所有子集标识
|
||||
sysOrgSubFlagCache.remove(allKeys);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -129,7 +129,7 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
|||
this.updateById(hrOrganization);
|
||||
|
||||
// 发布编辑机构事件
|
||||
BusinessEventPublisher.publishEvent(OrgConstants.EDIT_ORG_EVENT, hrOrganization);
|
||||
BusinessEventPublisher.publishEvent(OrgConstants.EDIT_ORG_EVENT, null);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue