mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-18 22:26:22 +08:00
修改me.chanjar.weixin.mp.bean.WxMpXmlOutTransferCustomerServiceMessage 支持将消息转发到多客服(https://mp.weixin.qq.com/wiki/5/ae230189c9bd07a6b221f48619aeef35.html)中的两种方式
This commit is contained in:
@@ -4,23 +4,22 @@ import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public class WxMpXmlOutTransferCustomerServiceMessage extends WxMpXmlOutMessage {
|
||||
@XStreamAlias("TransInfo")
|
||||
protected final TransInfo transInfo = new TransInfo();
|
||||
protected TransInfo transInfo;
|
||||
|
||||
public WxMpXmlOutTransferCustomerServiceMessage() {
|
||||
this.msgType = WxConsts.CUSTOM_MSG_TRANSFER_CUSTOMER_SERVICE;
|
||||
}
|
||||
|
||||
public String getKfAccount() {
|
||||
return transInfo.getKfAccount();
|
||||
public TransInfo getTransInfo() {
|
||||
return transInfo;
|
||||
}
|
||||
|
||||
public void setKfAccount(String kfAccount) {
|
||||
transInfo.setKfAccount(kfAccount);
|
||||
public void setTransInfo(TransInfo transInfo) {
|
||||
this.transInfo = transInfo;
|
||||
}
|
||||
|
||||
@XStreamAlias("TransInfo")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package me.chanjar.weixin.mp.bean.outxmlbuilder;
|
||||
|
||||
import me.chanjar.weixin.common.util.StringUtils;
|
||||
import me.chanjar.weixin.mp.bean.WxMpXmlOutTransferCustomerServiceMessage;
|
||||
|
||||
/**
|
||||
@@ -22,7 +23,11 @@ public final class TransferCustomerServiceBuilder extends BaseBuilder<TransferCu
|
||||
public WxMpXmlOutTransferCustomerServiceMessage build() {
|
||||
WxMpXmlOutTransferCustomerServiceMessage m = new WxMpXmlOutTransferCustomerServiceMessage();
|
||||
setCommon(m);
|
||||
m.setKfAccount(kfAccount);
|
||||
if(StringUtils.isNotBlank(kfAccount)){
|
||||
WxMpXmlOutTransferCustomerServiceMessage.TransInfo transInfo = new WxMpXmlOutTransferCustomerServiceMessage.TransInfo();
|
||||
transInfo.setKfAccount(kfAccount);
|
||||
m.setTransInfo(transInfo);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user