diff --git a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/PermissionClientModulesServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/PermissionClientModulesServiceImpl.java index f94e4351b..05a99e1f0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/PermissionClientModulesServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/PermissionClientModulesServiceImpl.java @@ -73,18 +73,21 @@ public class PermissionClientModulesServiceImpl implements PermissionClientModul } private void saveMongoLog(JSONObject account, JSONObject oldRecord, JSONObject modifyData, String business) { - modifyData.remove("id"); - PermissionClientModuleLog mongoRecord = new PermissionClientModuleLog(); - mongoRecord.setBusiness(business); - mongoRecord.setClientId(oldRecord.getIntValue("client_id")); - mongoRecord.setClientMoniker(oldRecord.getString("client_moniker")); - mongoRecord.setCreateTime(new Date()); - mongoRecord.setId(IdUtil.getId()); - mongoRecord.setUserId(account.getString("manager_id")); - mongoRecord.setUserName(account.getString("display_name")); - mongoRecord.setNewData(modifyData.toJSONString()); - Map beforeModify = modifyData.keySet().stream().collect(Collectors.toMap(key -> key, oldRecord::get)); - mongoRecord.setOriginData(JSON.toJSONString(beforeModify)); - mongoTemplate.insert(mongoRecord); + try { + modifyData.remove("id"); + PermissionClientModuleLog mongoRecord = new PermissionClientModuleLog(); + mongoRecord.setBusiness(business); + mongoRecord.setClientId(oldRecord.getIntValue("client_id")); + mongoRecord.setClientMoniker(oldRecord.getString("client_moniker")); + mongoRecord.setCreateTime(new Date()); + mongoRecord.setId(IdUtil.getId()); + mongoRecord.setUserId(account.getString("manager_id")); + mongoRecord.setUserName(account.getString("display_name")); + mongoRecord.setNewData(modifyData.toJSONString()); + Map beforeModify = modifyData.keySet().stream().collect(Collectors.toMap(key -> key, oldRecord::get)); + mongoRecord.setOriginData(JSON.toJSONString(beforeModify)); + mongoTemplate.insert(mongoRecord); + }catch (Exception ignore){ + } } }