You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.5 KiB
41 lines
1.5 KiB
|
3 years ago
|
package com.cyl.h5.controller;
|
||
|
|
|
||
|
2 years ago
|
import com.cyl.h5.pojo.dto.OrderCreateDTO;
|
||
|
|
import com.cyl.h5.pojo.vo.OrderCalcVO;
|
||
|
3 years ago
|
import com.cyl.h5.pojo.vo.form.OrderSubmitForm;
|
||
|
3 years ago
|
import com.cyl.h5.pojo.vo.query.OrderH5Query;
|
||
|
3 years ago
|
import com.cyl.oms.pojo.vo.OrderVO;
|
||
|
|
import com.cyl.oms.service.OrderService;
|
||
|
2 years ago
|
import io.swagger.annotations.ApiOperation;
|
||
|
3 years ago
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
3 years ago
|
import org.springframework.data.domain.Page;
|
||
|
|
import org.springframework.data.domain.Pageable;
|
||
|
3 years ago
|
import org.springframework.http.ResponseEntity;
|
||
|
|
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;
|
||
|
|
|
||
|
3 years ago
|
import java.util.List;
|
||
|
|
|
||
|
3 years ago
|
@RestController
|
||
|
2 years ago
|
@RequestMapping("/h5/order")
|
||
|
|
public class H5OrderController {
|
||
|
3 years ago
|
@Autowired
|
||
|
|
private OrderService orderService;
|
||
|
2 years ago
|
@PostMapping("/add")
|
||
|
3 years ago
|
public ResponseEntity<OrderVO> submit(@RequestBody OrderSubmitForm form) {
|
||
|
|
return ResponseEntity.ok(orderService.submit(form));
|
||
|
|
}
|
||
|
3 years ago
|
@PostMapping("orders")
|
||
|
|
public ResponseEntity<Page<OrderVO>> queryOrderPage(@RequestBody OrderH5Query query, Pageable pageReq) {
|
||
|
|
return ResponseEntity.ok(orderService.queryOrderPage(query, pageReq));
|
||
|
|
}
|
||
|
2 years ago
|
|
||
|
|
@ApiOperation("下单前校验")
|
||
|
|
@PostMapping("/addOrderCheck")
|
||
|
|
public ResponseEntity<OrderCalcVO> addOrderCheck(@RequestBody OrderCreateDTO orderCreateDTO){
|
||
|
|
return ResponseEntity.ok(orderService.addOrderCheck(orderCreateDTO));
|
||
|
|
}
|
||
|
3 years ago
|
}
|