lixing vor 4 Jahren
Ursprung
Commit
64030e93b2

+ 3 - 8
fm-person/src/main/java/com/persagy/fm/person/jms/handler/AccountMsgHandler.java

@@ -1,8 +1,6 @@
 package com.persagy.fm.person.jms.handler;
 
 import com.google.gson.Gson;
-import com.persagy.common.enums.ResponseCode;
-import com.persagy.common.exception.BusinessException;
 import com.persagy.fm.common.jms.MsgBaseHandler;
 import com.persagy.fm.department.constant.enums.DepTypeEnum;
 import com.persagy.fm.department.model.Department;
@@ -24,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
-import java.io.IOException;
 import java.util.Date;
 import java.util.List;
 
@@ -88,8 +85,6 @@ public class AccountMsgHandler {
         // 更新人员的账号信息
         if (person != null) {
             person.setUsername(accountUpdateMsg.getUsername());
-            person.setName(accountUpdateMsg.getUsername());
-            person.setNamePinyin(accountUpdateMsg.getUsername());
             personService.updatePerson(person);
         }
     }
@@ -130,10 +125,10 @@ public class AccountMsgHandler {
             try {
                 log.error("处理运维平台账号消息异常", e);
                 // 将消费失败的消息移除消息队列,避免重复消费
-//                channel.basicReject(msg.getMessageProperties().getDeliveryTag(), false);
+                //                channel.basicReject(msg.getMessageProperties().getDeliveryTag(), false);
             } catch (Exception ex) {
-//                throw new BusinessException(ResponseCode.C0001.getCode(),
-//                        "账号消息从队列中移除失败," + ex.getMessage());
+                //                throw new BusinessException(ResponseCode.C0001.getCode(),
+                //                        "账号消息从队列中移除失败," + ex.getMessage());
             }
         }
     }

+ 1 - 0
fm-person/src/main/java/com/persagy/fm/person/service/impl/PersonServiceImpl.java

@@ -509,6 +509,7 @@ public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person>
     private Person updatePersonBaseInfo(UpdatePersonDTO updatePersonDTO, String personId) {
         Person person = getById(personId);
         person = ConvertPersonTool.INSTANCE.convertUpdateDto2Entity(person, updatePersonDTO);
+        person.setNamePinyin(PinyinUtil.getPinyin(person.getName(), ""));
         List<String> professions = updatePersonDTO.getProfessions();
         if (CollectionUtils.isEmpty(professions)) {
             person.setProfession("");