Revert "发送IM模版消息时, 支持设置发送时间"

This reverts commit d67d1ca3c7.
This commit is contained in:
yanglin 2024-08-20 16:48:07 +08:00
parent c923a4cc83
commit bcde71c5d7
5 changed files with 3 additions and 45 deletions

View File

@ -1,6 +1,5 @@
package cn.axzo.msg.center.inside.notices.service.impl.v3;
import cn.axzo.msg.center.api.request.v3.ImSendInfo;
import cn.axzo.msg.center.api.request.v3.MessageSendReqV3;
import cn.axzo.msg.center.api.request.v3.PendingSendInfo;
import cn.axzo.msg.center.api.response.v3.MessageSendRespV3;
@ -34,15 +33,11 @@ public class MessageServiceV3Impl implements MessageServiceV3 {
PendingSendInfo pendingInfo = request.getChannelParam(
MessageSendReqV3.CHANNEL_PENDING, PendingSendInfo.class);
messageSendRequest.put("pendingSendInfo", pendingInfo);
// 4. 设置发送IM消息的信息
ImSendInfo imSendInfo = request.getChannelParam(
MessageSendReqV3.CHANNEL_IM, ImSendInfo.class);
messageSendRequest.put("imSendInfo", imSendInfo);
// 5. 构建event-hub的请求
// 4. 构建event-hub的请求
JSONObject performActionRequest = new JSONObject();
performActionRequest.put("eventCode", request.getBizEventMappingCode());
performActionRequest.put("messageSendRequest", messageSendRequest);
// 6. 调用event-hub的接口
// 5. 调用event-hub的接口
JSONObject response = actionClient.performAction(performActionRequest);
log.info("actionClient.performAction, request={}, resp={}", performActionRequest, response);
BizAssertions.assertTrue(response.getIntValue("code") == 200, response.getString("msg"));

View File

@ -143,9 +143,6 @@ public class TemplateMessage {
}
}
imReq.setReceivePersons(receivers);
if (req.getImSendInfo() != null) {
imReq.setPlanStartTime(req.getImSendInfo().getPlanStartTime());
}
// 扩展信息
JSONObject ext = new JSONObject();
ext.put("minAppVersion", template.getMinAppVersion());

View File

@ -1,23 +0,0 @@
package cn.axzo.msg.center.api.request.v3;
import lombok.Getter;
import lombok.Setter;
import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.Date;
/**
* @author yanglin
*/
@Setter
@Getter
public class ImSendInfo implements Serializable {
/**
* 计算发送时间
*/
@Nullable
private Date planStartTime;
}

View File

@ -29,11 +29,6 @@ public class MessageSendReqV3 implements Serializable {
*/
public static final String CHANNEL_PENDING = "channel_pending";
/**
* 发送IM消息时, channelParams key, 传值 {@link ImSendInfo}
*/
public static final String CHANNEL_IM = "channel_im";
/**
* 发起者
* <p>如果是平台则发起人为空

View File

@ -1,6 +1,5 @@
package cn.axzo.msg.center.api.request.v4;
import cn.axzo.msg.center.api.request.v3.ImSendInfo;
import cn.axzo.msg.center.api.request.v3.PendingSendInfo;
import com.alibaba.fastjson.JSON;
import lombok.Getter;
@ -29,15 +28,10 @@ public class MessageSendRequestV4 implements Serializable {
private MessageSendBasicInfoV4 sendBasicInfo;
/**
* 更多的待办信息, 发送待办时, 根据需要传入
* 发送待办时必传
*/
private PendingSendInfo pendingSendInfo;
/**
* 更多的IM信息, 发送IM时, 根据需要传入
*/
private ImSendInfo imSendInfo;
// !! internal fields
/**