diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java index 65ccdf0..73927f5 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java @@ -2,12 +2,11 @@ package com.hnac.hzims.message.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.google.api.client.util.Value; import com.hnac.hzims.message.MessageConstants; -import com.hnac.hzims.message.entity.MessagePushRecordEntity; -import com.hnac.hzims.message.log.aspect.SaveLog; import com.hnac.hzims.message.dto.PushDto; import com.hnac.hzims.message.dto.SmsPushDto; +import com.hnac.hzims.message.entity.MessagePushRecordEntity; +import com.hnac.hzims.message.log.aspect.SaveLog; import com.hnac.hzims.message.service.IMessageService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -19,6 +18,7 @@ import org.springblade.core.tool.utils.Func; import org.springblade.resource.feign.ISmsClient; import org.springframework.stereotype.Service; import org.springframework.util.Assert; +import org.springframework.util.ObjectUtils; /** * @author hx @@ -54,9 +54,16 @@ public class SmsMessageServiceImpl implements IMessageService { request.getSmsParam(), this.getAccountByPusher(Long.parseLong(request.getPusher()),request.getType()) ); - Assert.isTrue(response.isSuccess(),() -> { - throw new ServiceException(response.getMsg()); - }); - return response.getData().isSuccess(); + if(ObjectUtils.isEmpty(response.getData())) { + Assert.isTrue(response.isSuccess(), () -> { + throw new ServiceException(response.getMsg()); + }); + return response.isSuccess(); + }else { + Assert.isTrue(response.getData().isSuccess(), () -> { + throw new ServiceException(response.getMsg()); + }); + return response.getData().isSuccess(); + } } }