Skip to content

Commit 70e6016

Browse files
silloybinarywang
authored andcommitted
🐛 #1259 优化开放平台第三方业务域名设置相关接口返回结果
1 parent f394a62 commit 70e6016

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public interface WxOpenMaService extends WxMaService {
231231
*
232232
* @return
233233
*/
234-
public WxOpenResult getWebViewDomainInfo() throws WxErrorException;
234+
public WxOpenMaWebDomainResult getWebViewDomainInfo() throws WxErrorException;
235235

236236
/**
237237
* 设置小程序的业务域名
@@ -249,7 +249,7 @@ public interface WxOpenMaService extends WxMaService {
249249
* @param domainList
250250
* @return
251251
*/
252-
WxOpenResult setWebViewDomainInfo(String action, List<String> domainList) throws WxErrorException;
252+
WxOpenMaWebDomainResult setWebViewDomainInfo(String action, List<String> domainList) throws WxErrorException;
253253

254254
/**
255255
* 获取小程序的信息

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public String getWebViewDomain() throws WxErrorException {
110110
* @return
111111
*/
112112
@Override
113-
public WxOpenResult getWebViewDomainInfo() throws WxErrorException {
113+
public WxOpenMaWebDomainResult getWebViewDomainInfo() throws WxErrorException {
114114
return setWebViewDomainInfo("get", null);
115115
}
116116

@@ -141,9 +141,9 @@ public String setWebViewDomain(String action, List<String> domainList) throws Wx
141141
* @return
142142
*/
143143
@Override
144-
public WxOpenResult setWebViewDomainInfo(String action, List<String> domainList) throws WxErrorException {
144+
public WxOpenMaWebDomainResult setWebViewDomainInfo(String action, List<String> domainList) throws WxErrorException {
145145
String response = this.setWebViewDomain(action, domainList);
146-
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
146+
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaWebDomainResult.class);
147147
}
148148

149149

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package me.chanjar.weixin.open.bean.result;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.EqualsAndHashCode;
6+
7+
import java.util.List;
8+
9+
@Data
10+
@EqualsAndHashCode(callSuper = true)
11+
public class WxOpenMaWebDomainResult extends WxOpenResult {
12+
13+
private static final long serialVersionUID = -2182687859448940313L;
14+
15+
@SerializedName("webviewdomain")
16+
List<String> webviewdomainList;
17+
18+
}

0 commit comments

Comments
 (0)