|
|
@@ -3,10 +3,7 @@ package com.kym.miniapp.controller;
|
|
|
import com.kym.common.R;
|
|
|
import com.kym.common.controller.IController;
|
|
|
import com.kym.service.miniapp.WashDeviceService;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
@@ -44,7 +41,7 @@ public class WashDeviceController extends IController {
|
|
|
* @param shortId
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping(value = "/startDevice/{shortId}")
|
|
|
+ @PostMapping(value = "/startDevice/{shortId}")
|
|
|
R<?> startDevice(@PathVariable("shortId") String shortId) {
|
|
|
return resp(() -> washDeviceService.startDevice(shortId));
|
|
|
}
|
|
|
@@ -55,7 +52,7 @@ public class WashDeviceController extends IController {
|
|
|
* @param shortId
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping(value = "/stopDevice/{shortId}")
|
|
|
+ @PostMapping(value = "/stopDevice/{shortId}")
|
|
|
R<?> stopDevice(@PathVariable("shortId") String shortId) {
|
|
|
return resp((t) -> washDeviceService.stopDevice(shortId));
|
|
|
}
|