!63 #I9CYEO:optimize clone to taskinfo

Merge pull request !63 from liruohrh/sma-clone-optimize
pull/64/head
Java3y 3 months ago committed by Gitee
commit 3134aff968
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -10,7 +10,6 @@ import com.java3y.austin.handler.handler.HandlerHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
*
*
@ -29,8 +28,8 @@ public class SendMessageAction implements BusinessProcess<TaskInfo> {
if (ChannelType.MINI_PROGRAM.getCode().equals(taskInfo.getSendChannel())
|| ChannelType.OFFICIAL_ACCOUNT.getCode().equals(taskInfo.getSendChannel())
|| ChannelType.ALIPAY_MINI_PROGRAM.getCode().equals(taskInfo.getSendChannel())) {
TaskInfo taskClone = ObjectUtil.cloneByStream(taskInfo);
for (String receiver : taskInfo.getReceiver()) {
TaskInfo taskClone = ObjectUtil.cloneByStream(taskInfo);
taskClone.setReceiver(Sets.newHashSet(receiver));
handlerHolder.route(taskInfo.getSendChannel()).doHandler(taskClone);
}

Loading…
Cancel
Save