|
@ -753,7 +753,8 @@ public class YsDeviceService {
|
|
|
public JSONObject getDeviceLiveAddress2(String deviceSerial,Integer channelNo) throws Exception {
|
|
|
JSONObject result = new JSONObject();
|
|
|
MultiValueMap<String,String> param = new LinkedMultiValueMap<>();
|
|
|
param.add("accessToken",getIotAccessToken(deviceSerial));
|
|
|
String accessToken=getIotAccessToken(deviceSerial);
|
|
|
param.add("accessToken",accessToken);
|
|
|
if (StringUtils.isNotBlank(deviceSerial)){
|
|
|
param.add("deviceSerial",deviceSerial);
|
|
|
}
|
|
@ -765,7 +766,10 @@ public class YsDeviceService {
|
|
|
|
|
|
if (responseBody.getInteger("code")==200){
|
|
|
result.put(ResponseContant.resultFlag,ResponseContant.success);
|
|
|
result.put(ResponseContant.resultMsg,responseBody.getJSONObject("data").getString("url"));
|
|
|
JSONObject tmp = new JSONObject();
|
|
|
tmp.put("url",responseBody.getJSONObject("data").getString("url"));
|
|
|
tmp.put("accessToken",accessToken);
|
|
|
result.put(ResponseContant.resultMsg,tmp.toJSONString());
|
|
|
}else {
|
|
|
result.put(ResponseContant.resultFlag,ResponseContant.fail);
|
|
|
result.put(ResponseContant.resultMsg,responseBody.getString("msg"));
|