diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java index 29a85f07c..3d9ad8658 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java @@ -595,9 +595,8 @@ public class UserServiceImpl extends BaseServiceImpl implem EpdcCompleteAppUserDTO completeAppUser = formDto.getCompleteAppUser(); UserDTO userDto = ConvertUtils.sourceToTarget(completeAppUser, UserDTO.class); - if (StringUtils.isBlank(userDto.getWxUnionId())) { - userDto.setWxUnionId(null); - } + userDto.setWxUnionId(StringUtils.isBlank(userDto.getWxUnionId()) ? null : userDto.getWxUnionId()); + userDto.setFaceImg(StringUtils.isBlank(userDto.getFaceImg()) ? null : userDto.getFaceImg()); UserGridRelationDTO userGridRelation = formDto.getUserGridRelation(); String userId = userDto.getId(); @@ -620,7 +619,7 @@ public class UserServiceImpl extends BaseServiceImpl implem partyMembersEntity.setGridName(userGridRelation.getGrid()); partyMembersEntity.setRegistFlag(PartyMemberRegFlagEnum.AUTO.getValue()); partyMembersEntity.setMobile(userDto.getMobile()); - partyMembersEntity.setRegistTime(oldEntity.getRegisterTime()); + partyMembersEntity.setRegistTime(new Date()); QueryWrapper partyWrapper = new QueryWrapper<>(); partyWrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo) .eq(UserFieldConsant.REAL_NAME, userDto.getRealName()); @@ -636,7 +635,7 @@ public class UserServiceImpl extends BaseServiceImpl implem authenticationFailedEntity.setRealName(userDto.getRealName()); authenticationFailedEntity.setMobile(userDto.getMobile()); authenticationFailedEntity.setIdentityNo(identityNo); - authenticationFailedEntity.setRegistTime(oldEntity.getRegisterTime()); + authenticationFailedEntity.setRegistTime(new Date()); partyAuthenticationFailedDao.insert(authenticationFailedEntity); userDto.setState(AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value()); @@ -692,7 +691,7 @@ public class UserServiceImpl extends BaseServiceImpl implem UserGridRelationDTO relationInfo = userGridRelationService.getUserRelationInfo(userEntity.getId(), userGridRelation.getGridId()); userDto.setLeaderFlag(relationInfo.getLeaderFlag()); - userDto.setFaceImg(oldEntity.getFaceImg()); + userDto.setFaceImg(StringUtils.isBlank(userDto.getFaceImg()) ? oldEntity.getFaceImg() : userDto.getFaceImg()); return result.ok(userDto); } @@ -863,7 +862,7 @@ public class UserServiceImpl extends BaseServiceImpl implem /** * @param gridIdList - * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @return com.elink.esua.epdc.commons.tools.utils.Result> * @Author yinzuomei * @Description 根据网格id查询网格下所有的用户 * @Date 2019/12/19 15:03