Преглед на файлове

feat:公司邮箱保存失败问题修复

chenjianhua преди 1 месец
родител
ревизия
fbc5618faa
променени са 1 файла, в които са добавени 3 реда и са изтрити 4 реда
  1. 3 4
      service-manage/src/main/java/com/simuwang/manage/service/impl/ContactInformationServiceImpl.java

+ 3 - 4
service-manage/src/main/java/com/simuwang/manage/service/impl/ContactInformationServiceImpl.java

@@ -87,12 +87,11 @@ public class ContactInformationServiceImpl implements ContactInformationService
                 vo.setMsg("联系人信息已经存在,无需新增");
                 return vo;
             }
-            if (oldContactInformationDO == null) {
+            if (contactInformationVO.getId() !=null) {
+                contactInformationMapper.updateById(contactInformationDO);
+            }else {
                 contactInformationDO.setCreateTime(new Date());
                 contactInformationMapper.insert(contactInformationDO);
-            } else {
-                contactInformationDO.setId(oldContactInformationDO.getId());
-                contactInformationMapper.updateById(contactInformationDO);
             }
         }
         return vo;