#I9CYEO: optimize clone to taskinfo

pull/64/head
liruohrh 3 months ago
parent dfd0ef0502
commit 58368d0478

@ -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