forked from chanjarster/weixin-java-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpXmlOutTransferCustomerServiceMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package me.chanjar.weixin.mp.bean; | ||
|
||
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(); | ||
|
||
public WxMpXmlOutTransferCustomerServiceMessage() { | ||
this.msgType = WxConsts.CUSTOM_MSG_TRANSFER_CUSTOMER_SERVICE; | ||
} | ||
|
||
public String getKfAccount() { | ||
return transInfo.getKfAccount(); | ||
} | ||
|
||
public void setKfAccount(String kfAccount) { | ||
transInfo.setKfAccount(kfAccount); | ||
} | ||
|
||
@XStreamAlias("TransInfo") | ||
public static class TransInfo { | ||
|
||
@XStreamAlias("KfAccount") | ||
@XStreamConverter(value=XStreamCDataConverter.class) | ||
private String kfAccount; | ||
|
||
public String getKfAccount() { | ||
return kfAccount; | ||
} | ||
|
||
public void setKfAccount(String kfAccount) { | ||
this.kfAccount = kfAccount; | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...src/main/java/me/chanjar/weixin/mp/bean/outxmlbuilder/TransferCustomerServiceBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package me.chanjar.weixin.mp.bean.outxmlbuilder; | ||
|
||
import me.chanjar.weixin.mp.bean.WxMpXmlOutTransferCustomerServiceMessage; | ||
|
||
/** | ||
* 客服消息builder | ||
* <pre> | ||
* 用法: WxMpCustomMessage m = WxMpCustomMessage.TRANSFER_CUSTOMER_SERVICE().content(...).toUser(...).build(); | ||
* </pre> | ||
* | ||
* @author chanjarster | ||
*/ | ||
public final class TransferCustomerServiceBuilder extends BaseBuilder<TransferCustomerServiceBuilder, WxMpXmlOutTransferCustomerServiceMessage> { | ||
private String kfAccount; | ||
|
||
public TransferCustomerServiceBuilder kfAccount(String kfAccount) { | ||
this.kfAccount = kfAccount; | ||
return this; | ||
} | ||
|
||
|
||
public WxMpXmlOutTransferCustomerServiceMessage build() { | ||
WxMpXmlOutTransferCustomerServiceMessage m = new WxMpXmlOutTransferCustomerServiceMessage(); | ||
setCommon(m); | ||
m.setKfAccount(kfAccount); | ||
return m; | ||
} | ||
} |