diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index c04a05ce5b..adabeb3a69 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -141,15 +141,19 @@ public class CodeServiceImpl implements CodeService { if(CodeConstant.RESI.equals(formDTO.getClientType())) { resiName = getNickName(authInfo.getAuthorizerAppid()); AuthorizationInfoDTO workAuthInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), CodeConstant.WORK); - workName = getNickName(workAuthInfo.getAuthorizerAppid()); + if (null != workAuthInfo) { + workName = getNickName(workAuthInfo.getAuthorizerAppid()); + miniInfoDao.updateNickName(formDTO.getCustomerId(), CodeConstant.WORK, workName); + } miniInfoDao.updateNickName(formDTO.getCustomerId(), formDTO.getClientType(), resiName); - miniInfoDao.updateNickName(formDTO.getCustomerId(), CodeConstant.WORK, workName); } else { workName = getNickName(authInfo.getAuthorizerAppid()); AuthorizationInfoDTO resiAuthInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), CodeConstant.RESI); - resiName = getNickName(resiAuthInfo.getAuthorizerAppid()); + if (null != resiAuthInfo) { + resiName = getNickName(resiAuthInfo.getAuthorizerAppid()); + miniInfoDao.updateNickName(formDTO.getCustomerId(), CodeConstant.RESI, resiName); + } miniInfoDao.updateNickName(formDTO.getCustomerId(), formDTO.getClientType(), workName); - miniInfoDao.updateNickName(formDTO.getCustomerId(), CodeConstant.RESI, resiName); } //获取小程序居民端与工作端名称