@@ -23,7 +23,7 @@ public class WxMpDeviceServiceImpl implements WxMpDeviceService {
2323 @ Override
2424 public TransMsgResp transMsg (WxDeviceMsg msg ) throws WxErrorException {
2525 String url = API_URL_PREFIX + "/transmsg" ;
26- String response = this .wxMpService .post (url ,msg .toJson ());
26+ String response = this .wxMpService .post (url , msg .toJson ());
2727 return TransMsgResp .fromJson (response );
2828 }
2929
@@ -37,21 +37,21 @@ public WxDeviceQrCodeResult getQrCode(String productId) throws WxErrorException
3737 @ Override
3838 public WxDeviceAuthorizeResult authorize (WxDeviceAuthorize wxDeviceAuthorize ) throws WxErrorException {
3939 String url = API_URL_PREFIX + "/authorize_device" ;
40- String response = this .wxMpService .post (url ,wxDeviceAuthorize .toJson ());
40+ String response = this .wxMpService .post (url , wxDeviceAuthorize .toJson ());
4141 return WxDeviceAuthorizeResult .fromJson (response );
4242 }
4343
4444 @ Override
4545 public WxDeviceBindResult bind (WxDeviceBind wxDeviceBind ) throws WxErrorException {
4646 String url = API_URL_PREFIX + "/bind" ;
47- String response = this .wxMpService .post (url ,wxDeviceBind .toJson ());
47+ String response = this .wxMpService .post (url , wxDeviceBind .toJson ());
4848 return WxDeviceBindResult .fromJson (response );
4949 }
5050
5151 @ Override
5252 public WxDeviceBindResult compelBind (WxDeviceBind wxDeviceBind ) throws WxErrorException {
5353 String url = API_URL_PREFIX + "/compel_bind" ;
54- String response = this .wxMpService .post (url ,wxDeviceBind .toJson ());
54+ String response = this .wxMpService .post (url , wxDeviceBind .toJson ());
5555 return WxDeviceBindResult .fromJson (response );
5656 }
5757
@@ -68,5 +68,19 @@ public WxDeviceBindResult compelUnbind(WxDeviceBind wxDeviceBind) throws WxError
6868 String response = this .wxMpService .post (url , wxDeviceBind .toJson ());
6969 return WxDeviceBindResult .fromJson (response );
7070 }
71+
72+ @ Override
73+ public WxDeviceOpenIdResult getOpenId (String deviceType , String deviceId ) throws WxErrorException {
74+ String url = API_URL_PREFIX + "/get_openid" ;
75+ String response = this .wxMpService .get (url , "device_type=" + deviceType + "&device_id=" + deviceId );
76+ return WxDeviceOpenIdResult .fromJson (response );
77+ }
78+
79+ @ Override
80+ public WxDeviceBindDeviceResult getBindDevice (String openId ) throws WxErrorException {
81+ String url = API_URL_PREFIX +"/get_bind_device" ;
82+ String response = this .wxMpService .get (url ,"openid=" +openId );
83+ return WxDeviceBindDeviceResult .fromJson (response );
84+ }
7185}
7286
0 commit comments