updated code for call user action

This commit is contained in:
rajesh
2024-11-21 13:04:57 +05:30
parent c0906c9e7d
commit 531738f82f
5 changed files with 35 additions and 12 deletions

View File

@@ -131,7 +131,12 @@ public class LoggingUtil {
public void addVersionHistory(VersionHistoryRequest versionHistoryRequest) {
try {
Long userActionId = (Long) versionHistoryRequest.getRequest().getAttribute(GepafinConstant.USER_ACTION_ID);
Long recordId = versionHistoryRequest.getNewData().getId();
Long recordId = null;
if(versionHistoryRequest.getNewData() != null) {
recordId = versionHistoryRequest.getNewData().getId();
} else if(versionHistoryRequest.getOldData() != null){
recordId = versionHistoryRequest.getOldData().getId();
}
String tableName = getTableName(versionHistoryRequest.getNewData().getClass());
logVersionHistory(versionHistoryRequest, recordId, userActionId, tableName);
} catch (Exception e) {