-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat: #4118 增加微信客服知识库接口 #4119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
binarywang
wants to merge
2
commits into
develop
Choose a base branch
from
feat/4118-kf-knowledge
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: #4118 增加微信客服知识库接口 #4119
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroup.java
This file contains hidden or 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,22 @@ | ||
| package me.chanjar.weixin.cp.bean.kf; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
|
|
||
| import java.io.Serializable; | ||
|
|
||
| /** | ||
| * 微信客服知识库分组。 | ||
| */ | ||
| @Data | ||
| public class WxCpKfKnowledgeGroup implements Serializable { | ||
| private static final long serialVersionUID = -170690715179803477L; | ||
|
|
||
| @SerializedName("group_id") | ||
| private String groupId; | ||
|
|
||
| private String name; | ||
|
|
||
| @SerializedName("is_default") | ||
| private Integer isDefault; | ||
| } |
23 changes: 23 additions & 0 deletions
23
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupAddResp.java
This file contains hidden or 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,23 @@ | ||
| package me.chanjar.weixin.cp.bean.kf; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import me.chanjar.weixin.cp.bean.WxCpBaseResp; | ||
| import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
|
||
| /** | ||
| * 微信客服知识库分组新增返回结果。 | ||
| */ | ||
| @Data | ||
| @EqualsAndHashCode(callSuper = true) | ||
| public class WxCpKfKnowledgeGroupAddResp extends WxCpBaseResp { | ||
| private static final long serialVersionUID = 232872665454024387L; | ||
|
|
||
| @SerializedName("group_id") | ||
| private String groupId; | ||
|
|
||
| public static WxCpKfKnowledgeGroupAddResp fromJson(String json) { | ||
| return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeGroupAddResp.class); | ||
| } | ||
| } |
31 changes: 31 additions & 0 deletions
31
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupListResp.java
This file contains hidden or 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,31 @@ | ||
| package me.chanjar.weixin.cp.bean.kf; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import me.chanjar.weixin.cp.bean.WxCpBaseResp; | ||
| import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * 微信客服知识库分组列表返回结果。 | ||
| */ | ||
| @Data | ||
| @EqualsAndHashCode(callSuper = true) | ||
| public class WxCpKfKnowledgeGroupListResp extends WxCpBaseResp { | ||
| private static final long serialVersionUID = -8350717377843545855L; | ||
|
|
||
| @SerializedName("next_cursor") | ||
| private String nextCursor; | ||
|
|
||
| @SerializedName("has_more") | ||
| private Integer hasMore; | ||
|
|
||
| @SerializedName("group_list") | ||
| private List<WxCpKfKnowledgeGroup> groupList; | ||
|
|
||
| public static WxCpKfKnowledgeGroupListResp fromJson(String json) { | ||
| return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeGroupListResp.class); | ||
| } | ||
| } |
109 changes: 109 additions & 0 deletions
109
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntent.java
This file contains hidden or 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,109 @@ | ||
| package me.chanjar.weixin.cp.bean.kf; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
| import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * 微信客服知识库问答。 | ||
| */ | ||
| @Data | ||
| public class WxCpKfKnowledgeIntent implements Serializable { | ||
| private static final long serialVersionUID = -3777712166335763935L; | ||
|
|
||
| @SerializedName("group_id") | ||
| private String groupId; | ||
|
|
||
| @SerializedName("intent_id") | ||
| private String intentId; | ||
|
|
||
| private Question question; | ||
|
|
||
| @SerializedName("similar_questions") | ||
| private SimilarQuestions similarQuestions; | ||
|
|
||
| private List<Answer> answers; | ||
|
|
||
| public static WxCpKfKnowledgeIntent fromJson(String json) { | ||
| return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeIntent.class); | ||
| } | ||
|
|
||
| @Data | ||
| public static class Question implements Serializable { | ||
| private static final long serialVersionUID = -1833564733770700525L; | ||
| private Text text; | ||
| @SerializedName("similar_questions") | ||
| private SimilarQuestions similarQuestions; | ||
| private List<Answer> answers; | ||
| } | ||
|
|
||
| @Data | ||
| public static class Text implements Serializable { | ||
| private static final long serialVersionUID = -4775152873471313775L; | ||
| private String content; | ||
| } | ||
|
|
||
| @Data | ||
| public static class SimilarQuestions implements Serializable { | ||
| private static final long serialVersionUID = -3338135520171174537L; | ||
| private List<Question> items; | ||
| } | ||
|
|
||
| @Data | ||
| public static class Answer implements Serializable { | ||
| private static final long serialVersionUID = 482114683168970317L; | ||
| private Text text; | ||
| private List<Attachment> attachments; | ||
| } | ||
|
|
||
| @Data | ||
| public static class Attachment implements Serializable { | ||
| private static final long serialVersionUID = 547601649734690079L; | ||
| @SerializedName("msgtype") | ||
| private String msgType; | ||
| private Image image; | ||
| private Video video; | ||
| private Link link; | ||
| @SerializedName("miniprogram") | ||
| private MiniProgram miniProgram; | ||
| } | ||
|
|
||
| @Data | ||
| public static class Image implements Serializable { | ||
| private static final long serialVersionUID = -6305485241850490695L; | ||
| @SerializedName("media_id") | ||
| private String mediaId; | ||
| private String name; | ||
| } | ||
|
|
||
| @Data | ||
| public static class Video implements Serializable { | ||
| private static final long serialVersionUID = 4002145709503795505L; | ||
| @SerializedName("media_id") | ||
| private String mediaId; | ||
| private String name; | ||
| } | ||
|
|
||
| @Data | ||
| public static class Link implements Serializable { | ||
| private static final long serialVersionUID = -1844812819777892606L; | ||
| private String title; | ||
| @SerializedName("pic_url") | ||
| private String picUrl; | ||
| private String desc; | ||
| private String url; | ||
| } | ||
|
|
||
| @Data | ||
| public static class MiniProgram implements Serializable { | ||
| private static final long serialVersionUID = 6893025025270416975L; | ||
| private String title; | ||
| @SerializedName("thumb_media_id") | ||
| private String thumbMediaId; | ||
| private String appid; | ||
| private String pagepath; | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentAddResp.java
This file contains hidden or 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,23 @@ | ||
| package me.chanjar.weixin.cp.bean.kf; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import me.chanjar.weixin.cp.bean.WxCpBaseResp; | ||
| import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
|
||
| /** | ||
| * 微信客服知识库问答新增返回结果。 | ||
| */ | ||
| @Data | ||
| @EqualsAndHashCode(callSuper = true) | ||
| public class WxCpKfKnowledgeIntentAddResp extends WxCpBaseResp { | ||
| private static final long serialVersionUID = -2693926545826175543L; | ||
|
|
||
| @SerializedName("intent_id") | ||
| private String intentId; | ||
|
|
||
| public static WxCpKfKnowledgeIntentAddResp fromJson(String json) { | ||
| return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeIntentAddResp.class); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.