-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
9 changed files
with
507 additions
and
1 deletion.
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
23 changes: 23 additions & 0 deletions
23
...a/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionCreateResult.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,23 @@ | ||
package me.chanjar.weixin.cp.bean.external.acquisition; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import me.chanjar.weixin.cp.bean.WxCpBaseResp; | ||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
||
/** | ||
* 创建获客助手链接结果 | ||
* | ||
* @author alien_zyl | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class WxCpCustomerAcquisitionCreateResult extends WxCpBaseResp { | ||
private static final long serialVersionUID = -6301164294371861558L; | ||
|
||
private WxCpCustomerAcquisitionInfo.Link link; | ||
|
||
public static WxCpCustomerAcquisitionCreateResult fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionCreateResult.class); | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
...a/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionCustomerList.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,68 @@ | ||
package me.chanjar.weixin.cp.bean.external.acquisition; | ||
|
||
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; | ||
|
||
/** | ||
* 获取由获客链接添加的客户信息结果 | ||
* | ||
* @author alien_zyl | ||
*/ | ||
@Data | ||
public class WxCpCustomerAcquisitionCustomerList { | ||
|
||
@SerializedName("customer_list") | ||
private List<Customer> customerList; | ||
|
||
/** | ||
* 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空 | ||
*/ | ||
@SerializedName("next_cursor") | ||
private String nextCursor; | ||
|
||
|
||
public static WxCpCustomerAcquisitionCustomerList fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionCustomerList.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
@Data | ||
public static class Customer implements Serializable { | ||
private static final long serialVersionUID = 4456053823277371278L; | ||
|
||
/** | ||
* 客户external_userid | ||
*/ | ||
@SerializedName("external_userid") | ||
private String externalUserid; | ||
|
||
/** | ||
* 通过获客链接添加此客户的跟进人userid | ||
*/ | ||
@SerializedName("userid") | ||
private String userid; | ||
|
||
/** | ||
* 会话状态,0-客户未发消息 1-客户已发送消息 | ||
*/ | ||
@SerializedName("chat_status") | ||
private Integer chatStatus; | ||
|
||
/** | ||
* 用于区分客户具体是通过哪个获客链接进行添加, | ||
* 用户可在获客链接后拼接customer_channel=自定义字符串,字符串不超过64字节,超过会被截断。 | ||
* 通过点击带有customer_channel参数的链接获取到的客户,调用获客信息接口或获取客户详情接口时,返回的state参数即为链接后拼接自定义字符串 | ||
*/ | ||
@SerializedName("state") | ||
private String state; | ||
|
||
} | ||
|
||
} |
103 changes: 103 additions & 0 deletions
103
...main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionInfo.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,103 @@ | ||
package me.chanjar.weixin.cp.bean.external.acquisition; | ||
|
||
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.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 获客链接详情 | ||
* | ||
* @author alien_zyl | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class WxCpCustomerAcquisitionInfo extends WxCpBaseResp implements Serializable { | ||
|
||
private static final long serialVersionUID = -425354507473041229L; | ||
/** | ||
* link_id列表 | ||
*/ | ||
@SerializedName("link") | ||
private Link link; | ||
|
||
/** | ||
* 分页游标,在下次请求时填写以获取之后分页的记录 | ||
*/ | ||
@SerializedName("range") | ||
private Range range; | ||
|
||
/** | ||
* 是否无需验证,默认为true | ||
*/ | ||
@SerializedName("skip_verify") | ||
private Boolean skipVerify; | ||
|
||
public static WxCpCustomerAcquisitionInfo fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionInfo.class); | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class Link extends WxCpBaseResp implements Serializable { | ||
private static final long serialVersionUID = 6750537220943228300L; | ||
|
||
/** | ||
* 获客链接的id | ||
*/ | ||
@SerializedName("link_id") | ||
private String linkId; | ||
|
||
/** | ||
* 获客链接的名称 | ||
*/ | ||
@SerializedName("link_name") | ||
private String linkName; | ||
|
||
/** | ||
* 获客链接实际的url | ||
*/ | ||
@SerializedName("url") | ||
private String url; | ||
|
||
/** | ||
* 创建时间 | ||
*/ | ||
@SerializedName("create_time") | ||
private Long createTime; | ||
|
||
public static Link fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, Link.class); | ||
} | ||
} | ||
|
||
@Data | ||
public static class Range implements Serializable { | ||
private static final long serialVersionUID = -6343768645371744643L; | ||
|
||
/** | ||
* 此获客链接关联的userid列表,最多可关联100个 | ||
*/ | ||
@SerializedName("user_list") | ||
private List<String> userList; | ||
|
||
/** | ||
* 此获客链接关联的部门id列表,部门覆盖总人数最多100个 | ||
*/ | ||
@SerializedName("department_list") | ||
private List<String> departmentList; | ||
|
||
public static Range fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, Range.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.