-
-
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.
🆕 #2592 【企业微信】增加外部联系人聊天敏感词的的新增、修改、删除的接口方法
- Loading branch information
Showing
6 changed files
with
171 additions
and
20 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
61 changes: 61 additions & 0 deletions
61
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResp.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,61 @@ | ||
package me.chanjar.weixin.cp.bean.external; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
/** | ||
* 新增敏感词规则请求参数封装实体类 | ||
* | ||
* @author didi | ||
* @date 2022-04-17 | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class WxCpInterceptRuleResp { | ||
|
||
@SerializedName("rule_name") | ||
private String ruleName; | ||
@SerializedName("rule_id") | ||
private String ruleId; | ||
@SerializedName("word_list") | ||
private List<String> wordList; | ||
@SerializedName("semantics_list") | ||
private List<Integer> semanticsList; | ||
@SerializedName("intercept_type") | ||
private int interceptType; | ||
@SerializedName("applicable_range") | ||
private ApplicableRange applicableRange; | ||
|
||
@Data | ||
public static class ApplicableRange { | ||
@SerializedName("user_list") | ||
private List<String> userList; | ||
@SerializedName("department_list") | ||
private List<Integer> departmentList; | ||
public static ApplicableRange fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, ApplicableRange.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
} | ||
|
||
public static WxCpInterceptRuleResp fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpInterceptRuleResp.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResultResp.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,30 @@ | ||
package me.chanjar.weixin.cp.bean.external; | ||
|
||
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; | ||
|
||
/** | ||
* 新建敏感词规则负返回结果 | ||
* @author didi | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class WxCpInterceptRuleResultResp extends WxCpBaseResp implements Serializable { | ||
|
||
@SerializedName("rule_id") | ||
private String ruleId; | ||
|
||
public static WxCpInterceptRuleResultResp fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpInterceptRuleResultResp.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
} |
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