mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
#516 添加WiFi门店管理查询门店Wi-Fi信息的接口
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package me.chanjar.weixin.mp.api;
|
||||
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.mp.bean.wifi.WxMpWifiShopDataResult;
|
||||
import me.chanjar.weixin.mp.bean.wifi.WxMpWifiShopListResult;
|
||||
|
||||
/**
|
||||
@@ -21,8 +22,27 @@ public interface WxMpWifiService {
|
||||
* http请求方式: POST
|
||||
* 请求URL:https://api.weixin.qq.com/bizwifi/shop/list?access_token=ACCESS_TOKEN
|
||||
* </pre>
|
||||
* @param pageIndex 分页下标,默认从1开始
|
||||
*
|
||||
* @param pageIndex 分页下标,默认从1开始
|
||||
* @param pageSize 每页的个数,默认10个,最大20个
|
||||
* @return 结果
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
WxMpWifiShopListResult listShop(int pageIndex, int pageSize) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 查询门店Wi-Fi信息
|
||||
* 通过此接口查询某一门店的详细Wi-Fi信息,包括门店内的设备类型、ssid、密码、设备数量、商家主页URL、顶部常驻入口文案。
|
||||
*
|
||||
* http请求方式: POST
|
||||
* 请求URL:https://api.weixin.qq.com/bizwifi/shop/get?access_token=ACCESS_TOKEN
|
||||
* POST数据格式:JSON
|
||||
* </pre>
|
||||
*
|
||||
* @param shopId 门店ID
|
||||
* @return 结果
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
WxMpWifiShopDataResult getShopWifiInfo(int shopId) throws WxErrorException;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import lombok.RequiredArgsConstructor;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import me.chanjar.weixin.mp.api.WxMpWifiService;
|
||||
import me.chanjar.weixin.mp.bean.wifi.WxMpWifiShopDataResult;
|
||||
import me.chanjar.weixin.mp.bean.wifi.WxMpWifiShopListResult;
|
||||
import me.chanjar.weixin.mp.enums.WxMpApiUrl;
|
||||
|
||||
import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Wifi.*;
|
||||
import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Wifi.BIZWIFI_SHOP_GET;
|
||||
import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Wifi.BIZWIFI_SHOP_LIST;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@@ -29,4 +30,11 @@ public class WxMpWifiServiceImpl implements WxMpWifiService {
|
||||
final String result = this.wxMpService.post(BIZWIFI_SHOP_LIST, json.toString());
|
||||
return WxMpWifiShopListResult.fromJson(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpWifiShopDataResult getShopWifiInfo(int shopId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("shop_id", shopId);
|
||||
return WxMpWifiShopDataResult.fromJson(this.wxMpService.post(BIZWIFI_SHOP_GET, json.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user