|
@@ -0,0 +1,71 @@
|
|
|
+package com.chelvc.cloud.maintain.controller;
|
|
|
+
|
|
|
+import com.chelvc.cloud.maintain.vo.UserCouponVO;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.OrderQueryParam;
|
|
|
+import com.chelvc.cloud.vehicle.api.service.UserCouponService;
|
|
|
+import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 订单接口
|
|
|
+ *
|
|
|
+ * @author qizai
|
|
|
+ * @Date 2023/10/19
|
|
|
+ **/
|
|
|
+@Validated
|
|
|
+@RestController
|
|
|
+@ResponseWrapping
|
|
|
+public class OrderController {
|
|
|
+ @DubboReference
|
|
|
+ private UserCouponService userCouponService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户的订单列表
|
|
|
+ *
|
|
|
+ * @param param 查询参数
|
|
|
+ * @return 用户的订单列表
|
|
|
+ */
|
|
|
+ @GetMapping("/userorders")
|
|
|
+ public List<UserCouponVO> listUserOrders(@Valid OrderQueryParam param) {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取订单明细
|
|
|
+ *
|
|
|
+ * @param id 订单主键
|
|
|
+ * @return 订单明细
|
|
|
+ */
|
|
|
+ @GetMapping("/orderdetail/{id}")
|
|
|
+ public UserCouponVO getOrderDetail(@PathVariable("id") @Min(value = 1, message = "订单主键不能小于1") Long id) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 取消订单
|
|
|
+ *
|
|
|
+ * @param id 订单主键
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PutMapping("/cancelorder/{id}")
|
|
|
+ public void cancelOrder(@PathVariable("id") @Min(value = 1, message = "订单主键不能小于1") Long id) {
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 取消订单
|
|
|
+ *
|
|
|
+ * @param id 订单主键
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DeleteMapping("/deleteorder/{id}")
|
|
|
+ public void deleteOrder(@PathVariable("id") @Min(value = 1, message = "订单主键不能小于1") Long id) {
|
|
|
+ }
|
|
|
+}
|