|
|
@@ -1,12 +1,11 @@
|
|
|
package com.kym.miniapp.controller;
|
|
|
|
|
|
import com.kym.common.R;
|
|
|
+import com.kym.common.controller.IController;
|
|
|
import com.kym.entity.miniapp.queryParams.DeviceParams;
|
|
|
+import com.kym.entity.miniapp.queryParams.WashOrderParams;
|
|
|
import com.kym.service.miniapp.WashOrderService;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
@@ -18,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/wash-order")
|
|
|
-public class WashOrderController {
|
|
|
+public class WashOrderController extends IController {
|
|
|
|
|
|
private final WashOrderService washOrderService;
|
|
|
|
|
|
@@ -27,8 +26,19 @@ public class WashOrderController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 创建订单(启动洗车机)
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping(value = "/createOrder")
|
|
|
- R<?> createOrder(@RequestBody DeviceParams params){
|
|
|
- return R.success(washOrderService.createOrder(params));
|
|
|
+ R<?> createOrder(@RequestBody DeviceParams params) {
|
|
|
+ return resp(() -> washOrderService.createOrder(params));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping(value = "/createOrder")
|
|
|
+ R<?> queryOrder(@RequestBody WashOrderParams params) {
|
|
|
+ return resp(() -> washOrderService.queryOrder(params));
|
|
|
}
|
|
|
}
|