@Test public void testPushToBlacklist() throws Exception { TestConfigStorage configStorage = (TestConfigStorage) this.wxService .getWxMpConfigStorage(); List<String> openidList = new ArrayList<>(); openidList.add(configStorage.getOpenid()); this.wxService.getBlackListService().pushToBlacklist(openidList); }
@Override public void pushToBlacklist(List<String> openidList) throws WxErrorException { Map<String, Object> map = new HashMap<>(); map.put("openid_list", openidList); String url = API_BLACKLIST_PREFIX + "/batchblacklist"; this.wxMpService.execute(SimplePostRequestExecutor.create(this.wxMpService.getRequestHttp()), url, WxMpGsonBuilder.create().toJson(map)); }
WxMpUserBlacklistServiceImpl implements WxMpUserBlacklistService { @Override public void pushToBlacklist(List<String> openidList) throws WxErrorException { Map<String, Object> map = new HashMap<>(); map.put("openid_list", openidList); String url = API_BLACKLIST_PREFIX + "/batchblacklist"; this.wxMpService.execute(SimplePostRequestExecutor.create(this.wxMpService.getRequestHttp()), url, WxMpGsonBuilder.create().toJson(map)); } }
WxMpUserBlacklistServiceImpl implements WxMpUserBlacklistService { @Override public void pushToBlacklist(List<String> openidList) throws WxErrorException { Map<String, Object> map = new HashMap<>(); map.put("openid_list", openidList); String url = API_BLACKLIST_PREFIX + "/batchblacklist"; this.wxMpService.execute(SimplePostRequestExecutor.create(this.wxMpService.getRequestHttp()), url, WxMpGsonBuilder.create().toJson(map)); } WxMpUserBlacklistServiceImpl(WxMpService wxMpService); }
WxMpUserBlacklistServiceImpl implements WxMpUserBlacklistService { @Override public void pushToBlacklist(List<String> openidList) throws WxErrorException { Map<String, Object> map = new HashMap<>(); map.put("openid_list", openidList); String url = API_BLACKLIST_PREFIX + "/batchblacklist"; this.wxMpService.execute(SimplePostRequestExecutor.create(this.wxMpService.getRequestHttp()), url, WxMpGsonBuilder.create().toJson(map)); } WxMpUserBlacklistServiceImpl(WxMpService wxMpService); @Override WxMpUserBlacklistGetResult getBlacklist(String nextOpenid); @Override void pushToBlacklist(List<String> openidList); @Override void pullFromBlacklist(List<String> openidList); }
WxMpUserBlacklistServiceImpl implements WxMpUserBlacklistService { @Override public void pushToBlacklist(List<String> openidList) throws WxErrorException { Map<String, Object> map = new HashMap<>(); map.put("openid_list", openidList); String url = API_BLACKLIST_PREFIX + "/batchblacklist"; this.wxMpService.execute(SimplePostRequestExecutor.create(this.wxMpService.getRequestHttp()), url, WxMpGsonBuilder.create().toJson(map)); } WxMpUserBlacklistServiceImpl(WxMpService wxMpService); @Override WxMpUserBlacklistGetResult getBlacklist(String nextOpenid); @Override void pushToBlacklist(List<String> openidList); @Override void pullFromBlacklist(List<String> openidList);  }