diff --git a/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java index 6569221f..e79e6ed6 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java @@ -72,9 +72,10 @@ public class HighAgentServiceImpl implements HighAgentService { highAgentMapper.updateByPrimaryKey(highAgentModel); // 查询主账号 SecUser mainAccount = secUserService.getMainAccount(4, highAgentModel.getId()); + if (mainAccount != null) { - String userPass = MD5Util.encode(highAgentModel.getSecUser().getPassword().getBytes()); - if (!mainAccount.getPassword().equals(userPass)) { + if (!mainAccount.getPassword().equals(highAgentModel.getSecUser().getPassword())) { + String userPass = MD5Util.encode(highAgentModel.getSecUser().getPassword().getBytes()); mainAccount.setPassword(userPass); } if (highAgentModel.getStatus() == 0) {