| | |
| | | Map<String, Object> map = paramsInit(paramsMap);
|
| | | JsonObject jsonResult = null;
|
| | | if (CONST.isHdlServer()) {
|
| | | if(method.equals("bindDevice")){
|
| | | if (method.equals("bindDevice")) {
|
| | | jsonResult = doPost(CONST.HOST + "/home-wisdom/app/device/independentRegister", map, timeOut);
|
| | | }else {
|
| | | } else {
|
| | | jsonResult = doPost(CONST.HOST + "/home-wisdom/imou/openapi/" + method, map, timeOut);
|
| | | }
|
| | | } else {
|
| | |
| | | String msg = jsonResult.get("msg").getAsString();
|
| | | throw new BusinessException(code + msg);
|
| | | }
|
| | |
|
| | | JsonObject jsonData = new JsonObject();
|
| | | try {
|
| | | JsonObject jsonData = jsonResult.getAsJsonObject("data");
|
| | | jsonData = jsonResult.getAsJsonObject("data");
|
| | | if (jsonData == null) {
|
| | | jsonData = new JsonObject();
|
| | | }
|
| | | return jsonData;
|
| | |
|
| | | } catch (Throwable e) {
|
| | | BusinessException businessException = new BusinessException(e);
|
| | | throw businessException;
|
| | | // BusinessException businessException = new BusinessException(e);
|
| | | // throw businessException;
|
| | | }
|
| | | return jsonData;
|
| | | }
|
| | |
|
| | |
|