|
@@ -6,6 +6,7 @@ import com.usky.dxtop.controller.BaseController;
|
|
|
import com.usky.dxtop.model.Order;
|
|
|
import com.usky.dxtop.service.OrderService;
|
|
|
import com.usky.dxtop.service.api.TopApi;
|
|
|
+import com.usky.dxtop.service.emun.OrderStatus;
|
|
|
import com.usky.dxtop.service.vo.OrderRequest;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -39,6 +40,27 @@ public class OrderController extends BaseController {
|
|
|
return toAjax(orderService.add(order));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改订单状态
|
|
|
+ * @param order
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult update(@RequestBody Order order){
|
|
|
+ order.setOrderFlag(OrderStatus.SUCCESS.getCode());
|
|
|
+ return toAjax(orderService.updateById(order));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除订单
|
|
|
+ * @param orderNumber
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DeleteMapping("/{orderNumber}")
|
|
|
+ public AjaxResult remove(@PathVariable("orderNumber") String orderNumber){
|
|
|
+ return toAjax(orderService.remove(orderNumber));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页
|
|
|
* @param orderRequest
|