Skip to content

Commit b5956fb

Browse files
committed
🎨 精简代码,移除无用过期接口代码
1 parent 6d996f2 commit b5956fb

File tree

28 files changed

+113
-827
lines changed

28 files changed

+113
-827
lines changed

spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpServiceAutoConfiguration.java

Lines changed: 0 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -55,130 +55,4 @@ private WxMpService newWxMpServiceJoddHttpImpl() {
5555
return new WxMpServiceJoddHttpImpl();
5656
}
5757

58-
@Bean
59-
@Deprecated
60-
public WxMpKefuService wxMpKefuService(WxMpService wxMpService) {
61-
return wxMpService.getKefuService();
62-
}
63-
64-
@Bean
65-
@Deprecated
66-
public WxMpMaterialService wxMpMaterialService(WxMpService wxMpService) {
67-
return wxMpService.getMaterialService();
68-
}
69-
70-
@Bean
71-
@Deprecated
72-
public WxMpMenuService wxMpMenuService(WxMpService wxMpService) {
73-
return wxMpService.getMenuService();
74-
}
75-
76-
@Bean
77-
@Deprecated
78-
public WxMpUserService wxMpUserService(WxMpService wxMpService) {
79-
return wxMpService.getUserService();
80-
}
81-
82-
@Bean
83-
@Deprecated
84-
public WxMpUserTagService wxMpUserTagService(WxMpService wxMpService) {
85-
return wxMpService.getUserTagService();
86-
}
87-
88-
@Bean
89-
@Deprecated
90-
public WxMpQrcodeService wxMpQrcodeService(WxMpService wxMpService) {
91-
return wxMpService.getQrcodeService();
92-
}
93-
94-
@Bean
95-
@Deprecated
96-
public WxMpCardService wxMpCardService(WxMpService wxMpService) {
97-
return wxMpService.getCardService();
98-
}
99-
100-
@Bean
101-
@Deprecated
102-
public WxMpDataCubeService wxMpDataCubeService(WxMpService wxMpService) {
103-
return wxMpService.getDataCubeService();
104-
}
105-
106-
@Bean
107-
@Deprecated
108-
public WxMpUserBlacklistService wxMpUserBlacklistService(WxMpService wxMpService) {
109-
return wxMpService.getBlackListService();
110-
}
111-
112-
@Bean
113-
@Deprecated
114-
public WxMpStoreService wxMpStoreService(WxMpService wxMpService) {
115-
return wxMpService.getStoreService();
116-
}
117-
118-
@Bean
119-
@Deprecated
120-
public WxMpTemplateMsgService wxMpTemplateMsgService(WxMpService wxMpService) {
121-
return wxMpService.getTemplateMsgService();
122-
}
123-
124-
@Bean
125-
@Deprecated
126-
public WxMpSubscribeMsgService wxMpSubscribeMsgService(WxMpService wxMpService) {
127-
return wxMpService.getSubscribeMsgService();
128-
}
129-
130-
@Bean
131-
@Deprecated
132-
public WxMpDeviceService wxMpDeviceService(WxMpService wxMpService) {
133-
return wxMpService.getDeviceService();
134-
}
135-
136-
@Bean
137-
@Deprecated
138-
public WxMpShakeService wxMpShakeService(WxMpService wxMpService) {
139-
return wxMpService.getShakeService();
140-
}
141-
142-
@Bean
143-
@Deprecated
144-
public WxMpMemberCardService wxMpMemberCardService(WxMpService wxMpService) {
145-
return wxMpService.getMemberCardService();
146-
}
147-
148-
@Bean
149-
@Deprecated
150-
public WxMpMassMessageService wxMpMassMessageService(WxMpService wxMpService) {
151-
return wxMpService.getMassMessageService();
152-
}
153-
154-
@Bean
155-
@Deprecated
156-
public WxMpAiOpenService wxMpAiOpenService(WxMpService wxMpService) {
157-
return wxMpService.getAiOpenService();
158-
}
159-
160-
@Bean
161-
@Deprecated
162-
public WxMpWifiService wxMpWifiService(WxMpService wxMpService) {
163-
return wxMpService.getWifiService();
164-
}
165-
166-
@Bean
167-
@Deprecated
168-
public WxMpMarketingService wxMpMarketingService(WxMpService wxMpService) {
169-
return wxMpService.getMarketingService();
170-
}
171-
172-
@Bean
173-
@Deprecated
174-
public WxMpCommentService wxMpCommentService(WxMpService wxMpService) {
175-
return wxMpService.getCommentService();
176-
}
177-
178-
@Bean
179-
@Deprecated
180-
public WxOcrService wxMpOcrService(WxMpService wxMpService) {
181-
return wxMpService.getOcrService();
182-
}
183-
18458
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpChatService.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
* @author gaigeshen
1313
*/
1414
public interface WxCpChatService {
15-
16-
@Deprecated
17-
String chatCreate(String name, String owner, List<String> users, String chatId) throws WxErrorException;
18-
1915
/**
2016
* 创建群聊会话,注意:刚创建的群,如果没有下发消息,在企业微信不会出现该群.
2117
*
@@ -28,9 +24,6 @@ public interface WxCpChatService {
2824
*/
2925
String create(String name, String owner, List<String> users, String chatId) throws WxErrorException;
3026

31-
@Deprecated
32-
void chatUpdate(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete) throws WxErrorException;
33-
3427
/**
3528
* 修改群聊会话.
3629
*
@@ -43,9 +36,6 @@ public interface WxCpChatService {
4336
*/
4437
void update(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete) throws WxErrorException;
4538

46-
@Deprecated
47-
WxCpChat chatGet(String chatId) throws WxErrorException;
48-
4939
/**
5040
* 获取群聊会话.
5141
*

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaService.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,6 @@ WxCpApprovalInfo getApprovalInfo(@NonNull Date startTime, @NonNull Date endTime,
110110
*/
111111
WxCpApprovalDetailResult getApprovalDetail(@NonNull String spNo) throws WxErrorException;
112112

113-
/**
114-
* <pre>
115-
* 获取审批数据 (已过期, 请使用"批量获取审批单号" && "获取审批申请详情")
116-
* 通过本接口来获取公司一段时间内的审批记录。一次拉取调用最多拉取10000个审批记录,可以通过多次拉取的方式来满足需求,但调用频率不可超过600次/分。
117-
* API doc : https://work.weixin.qq.com/api/doc#90000/90135/91530
118-
* </pre>
119-
*
120-
* @param startTime 获取审批记录的开始时间
121-
* @param endTime 获取审批记录的结束时间
122-
* @param nextSpnum 第一个拉取的审批单号,不填从该时间段的第一个审批单拉取
123-
* @throws WxErrorException .
124-
* @see me.chanjar.weixin.cp.api.WxCpOaService#getApprovalInfo
125-
* @see me.chanjar.weixin.cp.api.WxCpOaService#getApprovalDetail
126-
*/
127-
@Deprecated
128-
WxCpApprovalDataResult getApprovalData(Date startTime, Date endTime, Long nextSpnum) throws WxErrorException;
129-
130113
/**
131114
* 获取公费电话拨打记录
132115
*

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTagService.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* @author <a href="https://github.com/binarywang">Binary Wang</a>
1818
*/
1919
public interface WxCpTagService {
20-
2120
/**
2221
* 创建标签.
2322
* <pre>
@@ -32,17 +31,6 @@ public interface WxCpTagService {
3231
*/
3332
String create(String name, Integer id) throws WxErrorException;
3433

35-
/**
36-
* 创建标签.
37-
*
38-
* @param tagName 标签名
39-
* @return 标签id
40-
* @throws WxErrorException .
41-
* @deprecated 建议使用 {@link #create(String, Integer)},其中后面的参数可以为空
42-
*/
43-
@Deprecated
44-
String create(String tagName) throws WxErrorException;
45-
4634
/**
4735
* 更新标签.
4836
*

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImpl.java

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@
2424
*/
2525
@RequiredArgsConstructor
2626
public class WxCpChatServiceImpl implements WxCpChatService {
27-
2827
private final WxCpService cpService;
2928

3029
@Override
31-
public String chatCreate(String name, String owner, List<String> users, String chatId) throws WxErrorException {
30+
public String create(String name, String owner, List<String> users, String chatId) throws WxErrorException {
3231
Map<String, Object> data = new HashMap<>(4);
3332
if (StringUtils.isNotBlank(name)) {
3433
data.put("name", name);
@@ -48,12 +47,7 @@ public String chatCreate(String name, String owner, List<String> users, String c
4847
}
4948

5049
@Override
51-
public String create(String name, String owner, List<String> users, String chatId) throws WxErrorException {
52-
return this.chatCreate(name, owner, users, chatId);
53-
}
54-
55-
@Override
56-
public void chatUpdate(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete)
50+
public void update(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete)
5751
throws WxErrorException {
5852
Map<String, Object> data = new HashMap<>(5);
5953
if (StringUtils.isNotBlank(chatId)) {
@@ -77,24 +71,13 @@ public void chatUpdate(String chatId, String name, String owner, List<String> us
7771
}
7872

7973
@Override
80-
public void update(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete)
81-
throws WxErrorException {
82-
chatUpdate(chatId, name, owner, usersToAdd, usersToDelete);
83-
}
84-
85-
@Override
86-
public WxCpChat chatGet(String chatId) throws WxErrorException {
74+
public WxCpChat get(String chatId) throws WxErrorException {
8775
final String url = this.cpService.getWxCpConfigStorage().getApiUrl(APPCHAT_GET_CHATID + chatId);
8876
String result = this.cpService.get(url, null);
8977
final String chatInfo = GsonParser.parse(result).getAsJsonObject("chat_info").toString();
9078
return WxCpGsonBuilder.create().fromJson(chatInfo, WxCpChat.class);
9179
}
9280

93-
@Override
94-
public WxCpChat get(String chatId) throws WxErrorException {
95-
return this.chatGet(chatId);
96-
}
97-
9881
@Override
9982
public void sendMsg(WxCpAppChatMessage message) throws WxErrorException {
10083
this.cpService.post(this.cpService.getWxCpConfigStorage().getApiUrl(APPCHAT_SEND), message.toJson());

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaServiceImpl.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,20 +164,6 @@ public WxCpApprovalDetailResult getApprovalDetail(@NonNull String spNo) throws W
164164
return WxCpGsonBuilder.create().fromJson(responseContent, WxCpApprovalDetailResult.class);
165165
}
166166

167-
@Override
168-
public WxCpApprovalDataResult getApprovalData(Date startTime, Date endTime, Long nextSpnum) throws WxErrorException {
169-
JsonObject jsonObject = new JsonObject();
170-
jsonObject.addProperty("starttime", startTime.getTime() / 1000L);
171-
jsonObject.addProperty("endtime", endTime.getTime() / 1000L);
172-
if (nextSpnum != null) {
173-
jsonObject.addProperty("next_spnum", nextSpnum);
174-
}
175-
176-
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_APPROVAL_DATA);
177-
String responseContent = this.mainService.post(url, jsonObject.toString());
178-
return WxCpGsonBuilder.create().fromJson(responseContent, WxCpApprovalDataResult.class);
179-
}
180-
181167
@Override
182168
public List<WxCpDialRecord> getDialRecord(Date startTime, Date endTime, Integer offset, Integer limit)
183169
throws WxErrorException {

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTagServiceImpl.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ public String create(String name, Integer id) throws WxErrorException {
4040
return this.create(o);
4141
}
4242

43-
@Override
44-
public String create(String tagName) throws WxErrorException {
45-
JsonObject o = new JsonObject();
46-
o.addProperty("tagname", tagName);
47-
return this.create(o);
48-
}
49-
5043
private String create(JsonObject param) throws WxErrorException {
5144
String url = this.mainService.getWxCpConfigStorage().getApiUrl(TAG_CREATE);
5245
String responseContent = this.mainService.post(url, param.toString());

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalDataResult.java

Lines changed: 0 additions & 69 deletions
This file was deleted.

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalDetailResult.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313
@Data
1414
public class WxCpApprovalDetailResult implements Serializable {
15-
1615
private static final long serialVersionUID = 3909779949756252918L;
1716

1817
@SerializedName("errcode")

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
@Data
1313
public class WxCpApprovalInfo implements Serializable {
14-
1514
private static final long serialVersionUID = 7387181805254287167L;
1615

1716
@SerializedName("errcode")

0 commit comments

Comments
 (0)