Skip to content

Commit ad6ad00

Browse files
authored
🆕 #3232 【开放平台】小程序增加获取隐私接口检测结果的API
1 parent 1589a85 commit ad6ad00

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/message/WxMpXmlMessage.java

+14
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,20 @@ public class WxMpXmlMessage implements Serializable {
709709
@JacksonXmlProperty(localName = "Reason")
710710
private String reason;
711711

712+
/**
713+
* 审核延后时的时间(整形),时间戳
714+
*/
715+
@XStreamAlias("DelayTime")
716+
@JacksonXmlProperty(localName = "DelayTime")
717+
private Long delayTime;
718+
719+
/**
720+
* 审核不通过的截图示例。用 | 分隔的 media_id 的列表
721+
*/
722+
@XStreamAlias("ScreenShot")
723+
@JacksonXmlProperty(localName = "ScreenShot")
724+
private String screenShot;
725+
712726
///////////////////////////////////////
713727
// 扫一扫事件推送
714728
///////////////////////////////////////

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

+15
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ public interface WxOpenMaService extends WxMaService {
225225
*/
226226
String API_GET_GRAY_RELEASE_PLAN = "https://api.weixin.qq.com/wxa/getgrayreleaseplan";
227227

228+
/**
229+
* 17 获取隐私接口检测结果
230+
*/
231+
String API_GET_CODE_PRIVACY_INFO = "https://api.weixin.qq.com/wxa/security/get_code_privacy_info";
232+
228233

229234
/**
230235
* 查询服务商的当月提审限额和加急次数(Quota)
@@ -624,6 +629,16 @@ WxOpenMaDomainResult modifyDomain(String action, List<String> requestDomains, Li
624629
*/
625630
WxOpenMaGrayReleasePlanResult getGrayReleasePlan() throws WxErrorException;
626631

632+
/**
633+
* 17. 获取隐私接口检测结果
634+
* https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/code-management/getCodePrivacyInfo.html
635+
*
636+
* @return {@link WxOpenMaGetCodePrivacyInfoResult }
637+
* @throws WxErrorException wx错误异常
638+
* @author Yuan
639+
*/
640+
WxOpenMaGetCodePrivacyInfoResult getCodePrivacyInfo() throws WxErrorException;
641+
627642
/**
628643
* 查询服务商的当月提审限额和加急次数(Quota)
629644
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Mini_Programs/code/query_quota.html

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

+6
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,12 @@ public WxOpenMaGrayReleasePlanResult getGrayReleasePlan() throws WxErrorExceptio
346346
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaGrayReleasePlanResult.class);
347347
}
348348

349+
@Override
350+
public WxOpenMaGetCodePrivacyInfoResult getCodePrivacyInfo() throws WxErrorException {
351+
String response = get(API_GET_CODE_PRIVACY_INFO, null);
352+
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaGetCodePrivacyInfoResult.class);
353+
}
354+
349355
@Override
350356
public WxOpenMaQueryQuotaResult queryQuota() throws WxErrorException {
351357
String response = get(API_QUERY_QUOTA, null);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
/**
10+
* 获取隐私接口检测返回结果
11+
*
12+
* @author Yuan
13+
* @version 1.0.0
14+
* @date 2024-02-01 12:49:58
15+
*/
16+
@Data
17+
@EqualsAndHashCode(callSuper = true)
18+
public class WxOpenMaGetCodePrivacyInfoResult extends WxOpenResult {
19+
20+
private static final long serialVersionUID = -2660090947103046607L;
21+
22+
/**
23+
* 没权限的隐私接口的api英文名
24+
*/
25+
@SerializedName("without_auth_list")
26+
private List<String> withoutAuthList;
27+
28+
/**
29+
* 没配置的隐私接口的api英文名
30+
*/
31+
@SerializedName("without_conf_list")
32+
private List<String> withoutConfList;
33+
34+
}

0 commit comments

Comments
 (0)