src/cn/binarywang/wx/miniapp/api/WxMaService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/com/yc/sdk/miniapp/api/MyWxMaPrivacyService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/com/yc/sdk/miniapp/api/impl/MyWxMaPrivacyServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/com/yc/sdk/weixinopen/action/MiniAppCodeManagement.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/cn/binarywang/wx/miniapp/api/WxMaService.java
@@ -13,7 +13,7 @@ import java.util.Map; import com.yc.sdk.miniapp.api.MyWxMaLiveService; import com.yc.sdk.miniapp.api.MyWxMaPrivacySetting; import com.yc.sdk.miniapp.api.MyWxMaPrivacyService; /** * The interface Wx ma service. @@ -418,5 +418,5 @@ * Added by Johns Wang,2021-11-12 * @return */ MyWxMaPrivacySetting getMyPrivacySetting(); MyWxMaPrivacyService getMyPrivacyService(); } src/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java
@@ -10,9 +10,9 @@ import com.google.gson.Gson; import com.google.gson.JsonObject; import com.yc.sdk.miniapp.api.MyWxMaLiveService; import com.yc.sdk.miniapp.api.MyWxMaPrivacySetting; import com.yc.sdk.miniapp.api.MyWxMaPrivacyService; import com.yc.sdk.miniapp.api.impl.MyWxMaLiveServiceImpl; import com.yc.sdk.miniapp.api.impl.MyWxMaPrivacySettingImpl; import com.yc.sdk.miniapp.api.impl.MyWxMaPrivacyServiceImpl; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.api.WxConsts; @@ -65,7 +65,7 @@ private final WxMaCloudService cloudService = new WxMaCloudServiceImpl(this); private final WxMaLiveService liveService = new WxMaLiveServiceImpl(this); private final MyWxMaLiveService myLiveService = new MyWxMaLiveServiceImpl(this); //Added by JohnsWang,2021-06-05 private final MyWxMaPrivacySetting myPrivacySetting = new MyWxMaPrivacySettingImpl(this); //Added by JohnsWang,2021-11-12 private final MyWxMaPrivacyService myPrivacyService = new MyWxMaPrivacyServiceImpl(this); //Added by JohnsWang,2021-11-12 private final WxMaLiveGoodsService liveGoodsService = new WxMaLiveGoodsServiceImpl(this); private final WxMaLiveMemberService liveMemberService = new WxMaLiveMemberServiceImpl(this); private final WxOcrService ocrService = new WxMaOcrServiceImpl(this); @@ -78,8 +78,8 @@ @Override public MyWxMaPrivacySetting getMyPrivacySetting() { return myPrivacySetting; public MyWxMaPrivacyService getMyPrivacyService() { return myPrivacyService; } @Override src/com/yc/sdk/miniapp/api/MyWxMaPrivacyService.java
File was renamed from src/com/yc/sdk/miniapp/api/MyWxMaPrivacySetting.java @@ -6,7 +6,7 @@ import me.chanjar.weixin.common.error.WxErrorException; public interface MyWxMaPrivacySetting { public interface MyWxMaPrivacyService { /** * 配置小程序用户隐私保护 */ @@ -28,15 +28,15 @@ * @return * @throws WxErrorException */ public boolean setPrivacySetting(MaPrivaceEntity maPrivaceEntity) throws WxErrorException; public boolean setPrivacy(MaPrivaceEntity maPrivaceEntity) throws WxErrorException; /** * 查询小程序用户隐私保护 * @param privacyVer * @return * @throws WxErrorException */ public MaPrivaceEntity getPrivacySetting(Integer privacyVer) throws WxErrorException; public MaPrivaceEntity getPrivacy(Integer privacyVer) throws WxErrorException; /** * 上传自定义的小程序的用户隐私保护文件 src/com/yc/sdk/miniapp/api/impl/MyWxMaPrivacyServiceImpl.java
File was renamed from src/com/yc/sdk/miniapp/api/impl/MyWxMaPrivacySettingImpl.java @@ -7,7 +7,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.yc.sdk.miniapp.api.MyWxMaPrivacySetting; import com.yc.sdk.miniapp.api.MyWxMaPrivacyService; import com.yc.sdk.miniapp.entity.MaPrivaceEntity; import com.yc.sdk.miniapp.entity.MaPrivaceEntity.OwnerSetting; import com.yc.sdk.miniapp.entity.MaPrivaceEntity.PrivacyDesc; @@ -19,11 +19,11 @@ import me.chanjar.weixin.common.util.json.GsonHelper; @AllArgsConstructor public class MyWxMaPrivacySettingImpl implements MyWxMaPrivacySetting { public class MyWxMaPrivacyServiceImpl implements MyWxMaPrivacyService { private WxMaService wxMaService; @Override public boolean setPrivacySetting(MaPrivaceEntity maPrivaceEntity) throws WxErrorException{ public boolean setPrivacy(MaPrivaceEntity maPrivaceEntity) throws WxErrorException{ JsonObject json = new JsonObject(); json.addProperty("privacy_ver", maPrivaceEntity.getPrivacyVer()); @@ -53,15 +53,15 @@ } @Override public MaPrivaceEntity getPrivacySetting(Integer privacyVer) throws WxErrorException { public MaPrivaceEntity getPrivacy(Integer privacyVer) throws WxErrorException { JsonObject json = new JsonObject(); json.addProperty("privacy_ver", privacyVer); String responseText = this.wxMaService.post(inquirePrivacySetting,json.toString()); return getPrivacySetting(responseText) ; return getPrivacyEntity(responseText) ; } public static MaPrivaceEntity getPrivacySetting(String responseText) { public static MaPrivaceEntity getPrivacyEntity(String responseText) { MaPrivaceEntity maPrivaceEntity = new MaPrivaceEntity(); JsonObject jsonObject = JsonParser.parseString(responseText).getAsJsonObject(); src/com/yc/sdk/weixinopen/action/MiniAppCodeManagement.java
@@ -781,7 +781,7 @@ //查询小程序用户隐私保护 WxOpenMaService wxOpenMaService = wxOpenService.getWxOpenComponentService().getWxMaServiceByAppid(authorizationAppid) ; MaPrivaceEntity maPrivaceEntity = wxOpenMaService.getMyPrivacySetting().getPrivacySetting(privacySettingVer==null||"".equals(privacySettingVer)?2:Integer.parseInt(privacySettingVer)) ; MaPrivaceEntity maPrivaceEntity = wxOpenMaService.getMyPrivacyService().getPrivacy(privacySettingVer==null||"".equals(privacySettingVer)?2:Integer.parseInt(privacySettingVer)) ; if (maPrivaceEntity == null || maPrivaceEntity.getCodeExist() == null || maPrivaceEntity.getCodeExist()==0) { this.print(response, callBackMessage.sendErrorMessage("【设置隐私信息】失败!")); return ; @@ -810,7 +810,7 @@ } //设置小程序用户隐私保护 boolean isSuccess = wxOpenMaService.getMyPrivacySetting().setPrivacySetting(maPrivaceEntity); boolean isSuccess = wxOpenMaService.getMyPrivacyService().setPrivacy(maPrivaceEntity); if (isSuccess) { authAppIdBy3rdIfc.savePrivacySetting(wxOpenService.getWxOpenConfigStorage().getComponentAppId(), authorizationAppid,maPrivaceEntity.getPrivacyMsg()) ; this.print(response, callBackMessage.sendSuccessMessage("【设置隐私信息】成功!"));