mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-22 03:27:39 +08:00
🎨 清理一些jetbrain的校验注解
This commit is contained in:
@@ -19,7 +19,6 @@ import me.chanjar.weixin.open.bean.tcb.ShareCloudBaseEnvRequest;
|
||||
import me.chanjar.weixin.open.bean.tcb.ShareCloudBaseEnvResponse;
|
||||
import me.chanjar.weixin.open.bean.tcbComponent.GetShareCloudBaseEnvResponse;
|
||||
import me.chanjar.weixin.open.bean.tcbComponent.GetTcbEnvListResponse;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -500,7 +499,7 @@ public interface WxOpenComponentService {
|
||||
* @return 小程序代码模版列表 (templateId)
|
||||
* @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档
|
||||
*/
|
||||
List<WxOpenMaCodeTemplate> getTemplateList(@Nullable Integer templateType) throws WxErrorException;
|
||||
List<WxOpenMaCodeTemplate> getTemplateList(Integer templateType) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 请参考并使用 {@link #addToTemplate(long, int)}.
|
||||
|
@@ -2,7 +2,6 @@ package me.chanjar.weixin.open.api;
|
||||
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.open.bean.ma.privacy.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* 微信第三方平台 小程序用户隐私保护指引接口 / 申请隐私接口(从2022年4月18日开始,部分小程序前端 api 需申请后,方可使用。该接口用于获取“需申请并审核通过”后才可使用的接口列表。)
|
||||
@@ -47,7 +46,7 @@ public interface WxOpenMaPrivacyService {
|
||||
* @return 查询结果
|
||||
* @throws WxErrorException 如果出错,抛出此异常
|
||||
*/
|
||||
GetPrivacySettingResult getPrivacySetting(@Nullable Integer privacyVer) throws WxErrorException;
|
||||
GetPrivacySettingResult getPrivacySetting(Integer privacyVer) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -35,7 +35,6 @@ import me.chanjar.weixin.open.bean.tcbComponent.GetShareCloudBaseEnvResponse;
|
||||
import me.chanjar.weixin.open.bean.tcbComponent.GetTcbEnvListResponse;
|
||||
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
@@ -503,7 +502,7 @@ public class WxOpenComponentServiceImpl implements WxOpenComponentService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WxOpenMaCodeTemplate> getTemplateList(@Nullable Integer templateType) throws WxErrorException {
|
||||
public List<WxOpenMaCodeTemplate> getTemplateList(Integer templateType) throws WxErrorException {
|
||||
String url = GET_TEMPLATE_LIST_URL + (templateType == null ? "" : "?template_type=" + templateType);
|
||||
String responseContent = get(url, "access_token");
|
||||
JsonObject response = GsonParser.parse(StringUtils.defaultString(responseContent, "{}"));
|
||||
|
@@ -8,7 +8,6 @@ import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.open.api.WxOpenMaPrivacyService;
|
||||
import me.chanjar.weixin.open.bean.ma.privacy.*;
|
||||
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -26,8 +25,8 @@ public class WxOpenMaPrivacyServiceImpl implements WxOpenMaPrivacyService {
|
||||
|
||||
|
||||
@Override
|
||||
public GetPrivacySettingResult getPrivacySetting(@Nullable Integer privacyVer) throws WxErrorException {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
public GetPrivacySettingResult getPrivacySetting(Integer privacyVer) throws WxErrorException {
|
||||
Map<String, Object> params = new HashMap<>(1);
|
||||
if (privacyVer != null) {
|
||||
params.put("privacy_ver", privacyVer);
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 小程序用户隐私保护指引 收集方(开发者)信息配置
|
||||
@@ -51,7 +50,6 @@ public class PrivacyOwnerSetting {
|
||||
/**
|
||||
* 通知方式,指的是当开发者收集信息有变动时,通过该方式通知用户。这里服务商需要按照实际情况填写,例如通过弹窗或者公告或者其他方式。
|
||||
*/
|
||||
@NotNull
|
||||
@SerializedName("notice_method")
|
||||
private String noticeMethod;
|
||||
|
||||
|
@@ -5,8 +5,8 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -18,7 +18,8 @@ import java.util.List;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SetPrivacySetting {
|
||||
public class SetPrivacySetting implements Serializable {
|
||||
private static final long serialVersionUID = -4309547831976480043L;
|
||||
|
||||
/**
|
||||
* 用户隐私保护指引的版本,1表示现网版本;2表示开发版。默认是2开发版。
|
||||
@@ -29,14 +30,12 @@ public class SetPrivacySetting {
|
||||
/**
|
||||
* 收集方(开发者)信息配置
|
||||
*/
|
||||
@NotNull
|
||||
@SerializedName("owner_setting")
|
||||
private PrivacyOwnerSetting ownerSetting;
|
||||
|
||||
/**
|
||||
* 要收集的用户信息配置
|
||||
*/
|
||||
@NotNull
|
||||
@SerializedName("setting_list")
|
||||
private List<Setting> settingList;
|
||||
|
||||
@@ -45,7 +44,8 @@ public class SetPrivacySetting {
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Setting {
|
||||
public static class Setting implements Serializable {
|
||||
private static final long serialVersionUID = 1141496605788764479L;
|
||||
|
||||
/**
|
||||
* 官方的可选值参考下方说明;该字段也支持自定义
|
||||
@@ -53,7 +53,6 @@ public class SetPrivacySetting {
|
||||
* @see PrivacyKeyEnum
|
||||
* @see PrivacyKeyEnum#getKey()
|
||||
*/
|
||||
@NotNull
|
||||
@SerializedName("privacy_key")
|
||||
private String privacyKey;
|
||||
|
||||
@@ -61,7 +60,6 @@ public class SetPrivacySetting {
|
||||
* 请填写收集该信息的用途。例如privacy_key=Location(位置信息),那么privacy_text则填写收集位置信息的用途。
|
||||
* 无需再带上“为了”或者“用于”这些字眼,小程序端的显示格式是为了xxx,因此开发者只需要直接填写用途即可。
|
||||
*/
|
||||
@NotNull
|
||||
@SerializedName("privacy_text")
|
||||
private String privacyText;
|
||||
}
|
||||
|
Reference in New Issue
Block a user