mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
iot交互大致框架修改
This commit is contained in:
parent
496eb7c450
commit
a7bf08efc6
@ -38,7 +38,7 @@ public class IotService {
|
||||
*/
|
||||
public String httpCtlPostSend(String deviceCode,String cmd){
|
||||
DeviceCtlDto dto = new DeviceCtlDto();
|
||||
DeviceCtlDto.Params params = dto.getParams();
|
||||
DeviceCtlDto.Params params = new DeviceCtlDto.Params();
|
||||
params.setCommand(cmd);
|
||||
dto.setParams(params);
|
||||
Map<String, String> paramMap = new HashMap<>();
|
||||
|
||||
@ -69,10 +69,10 @@ public class IotHttpTest {
|
||||
@Test
|
||||
public void testMethod(){
|
||||
String deviceCode = "4cd72020-2b11-11ef-890f-e7ba493dc999";
|
||||
String cmd = "";
|
||||
String cmd = "{\"method\":\"zzctest\",\"params\":{\"switch\":\"on\"}}";
|
||||
|
||||
// String result = httpCtlPostSend(deviceCode,cmd);
|
||||
// System.out.println(result);
|
||||
String result = httpCtlPostSend(deviceCode,cmd);
|
||||
System.out.println(result);
|
||||
|
||||
String result2 = httpTelemetryGetSend(deviceCode);
|
||||
System.out.println(result2);
|
||||
@ -93,7 +93,7 @@ public class IotHttpTest {
|
||||
*/
|
||||
public String httpCtlPostSend(String deviceCode,String cmd){
|
||||
DeviceCtlDto dto = new DeviceCtlDto();
|
||||
DeviceCtlDto.Params params = dto.getParams();
|
||||
DeviceCtlDto.Params params = new DeviceCtlDto.Params();
|
||||
params.setCommand(cmd);
|
||||
dto.setParams(params);
|
||||
Map<String, String> paramMap = new HashMap<>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user