From 70db8dec1788fa0ab1274f6ea7a4482504f1a7ad Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 31 Dec 2021 10:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=AF=9B=E7=97=85=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E6=98=AF=E8=BF=94=E5=9B=9Enull,=E5=8F=AF=E8=83=BD=E6=98=AF?= =?UTF-8?q?=E5=BD=93=E6=97=B6=E7=BA=A6=E5=AE=9A=E5=A5=BD=E7=9A=84=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/VolunteerInfoServiceImpl.java | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 8fe4ff348d..b973a249a1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -24,10 +24,8 @@ import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; -import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; -import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; @@ -38,7 +36,6 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.SendMqMsgUtils; import com.epmet.constant.SmsTemplateConstant; import com.epmet.constant.SystemMessageType; import com.epmet.dao.VolunteerInfoDao; @@ -46,11 +43,7 @@ import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.HeartUserInfoDTO; import com.epmet.dto.VolunteerInfoDTO; -import com.epmet.dto.form.CommonCustomerFormDTO; -import com.epmet.dto.form.CustomerGridFormDTO; -import com.epmet.dto.form.SendVerificationCodeFormDTO; -import com.epmet.dto.form.VolunteerRegResiFormDTO; -import com.epmet.dto.form.SystemMsgFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; import com.epmet.dto.result.ResiUserBaseInfoResultDTO; @@ -74,11 +67,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Optional; +import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -234,15 +223,15 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO){ - // 获取志愿者信息 - VolunteerInfoDTO dto = baseDao.selectVolunteerInfoByUserId(tokenDto.getUserId()); + // 获取志愿者信息 + // Integer volunteerFlag = baseDao.queryVolunteerFlagByUserId(tokenDto.getUserId()); + VolunteerInfoDTO dto = baseDao.selectVolunteerInfoByUserId(tokenDto.getUserId()); + if (null!=dto){ resultDTO.setVolunteerIntroduce(dto.getVolunteerIntroduce() == null ? "" : dto.getVolunteerIntroduce()); resultDTO.setVolunteerSignature(dto.getVolunteerSignature() == null ? "" : dto.getVolunteerSignature()); // 遗留数据处理,如果表中数据为空,一律返回null,前端重新获取 网格信息 resultDTO.setGridId( "".equals(dto.getGridId()) ? null : dto.getGridId()); - resultDTO.setGridName( "".equals(dto.getGridName()) ? null : dto.getGridName()); + resultDTO.setGridName( "".equals(dto.getGridName()) ? null : dto.getGridName()); } } else { logger.error("获取用户基本信息失败");