Commit dcf55c35338aa961fb06a7fa9eee638599a68bc7

Authored by Dincat
Committed by 芋道源码
1 parent 44bba85a

!1196 修复角色更新时,记录的操作日志将更新前的数据记录为空的问题

* 修复角色更新时,记录的操作日志将更新前的数据记录为空的问题
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java
... ... @@ -86,6 +86,7 @@ public class RoleServiceImpl implements RoleService {
86 86 roleMapper.updateById(updateObj);
87 87  
88 88 // 3. 记录操作日志上下文
  89 + LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(role, RoleSaveReqVO.class));
89 90 LogRecordContext.putVariable("role", role);
90 91 }
91 92  
... ... @@ -118,7 +119,6 @@ public class RoleServiceImpl implements RoleService {
118 119 permissionService.processRoleDeleted(id);
119 120  
120 121 // 3. 记录操作日志上下文
121   - LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(role, RoleSaveReqVO.class));
122 122 LogRecordContext.putVariable("role", role);
123 123 }
124 124  
... ...