|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.java3y.austin.service.api.impl.service;
|
|
|
|
|
|
|
|
|
|
import cn.monitor4all.logRecord.annotation.OperationLog;
|
|
|
|
|
import com.java3y.austin.common.enums.RespStatusEnum;
|
|
|
|
|
import com.java3y.austin.common.vo.BasicResultVO;
|
|
|
|
|
import com.java3y.austin.service.api.domain.BatchSendRequest;
|
|
|
|
|
import com.java3y.austin.service.api.domain.SendRequest;
|
|
|
|
@ -9,6 +10,7 @@ import com.java3y.austin.service.api.impl.domain.SendTaskModel;
|
|
|
|
|
import com.java3y.austin.service.api.service.SendService;
|
|
|
|
|
import com.java3y.austin.support.pipeline.ProcessContext;
|
|
|
|
|
import com.java3y.austin.support.pipeline.ProcessController;
|
|
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
@ -28,6 +30,10 @@ public class SendServiceImpl implements SendService {
|
|
|
|
|
@Override
|
|
|
|
|
@OperationLog(bizType = "SendService#send", bizId = "#sendRequest.messageTemplateId", msg = "#sendRequest")
|
|
|
|
|
public SendResponse send(SendRequest sendRequest) {
|
|
|
|
|
// 添加对 sendRequest 参数的判空,防止后面空指针
|
|
|
|
|
if(ObjectUtils.isEmpty(sendRequest)){
|
|
|
|
|
return new SendResponse(RespStatusEnum.CLIENT_BAD_PARAMETERS.getCode(), RespStatusEnum.CLIENT_BAD_PARAMETERS.getMsg());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SendTaskModel sendTaskModel = SendTaskModel.builder()
|
|
|
|
|
.messageTemplateId(sendRequest.getMessageTemplateId())
|
|
|
|
|