|
@@ -9,11 +9,8 @@ import com.tour.common.utils.file.FileUploadUtils;
|
|
|
import com.tour.framework.config.ServerConfig;
|
|
|
import com.tour.module.domain.Order;
|
|
|
import com.tour.module.service.IOrderService;
|
|
|
-import com.tour.module.vo.OrderVo;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
+import com.tour.module.vo.*;
|
|
|
+import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -46,18 +43,22 @@ public class OrderApi extends BaseController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(required = true, paramType = "query", name = "orderId", value = " 订单号")
|
|
|
})
|
|
|
+
|
|
|
@GetMapping(value = "/detail")
|
|
|
@AccessToken
|
|
|
- public BaseResult detail(@RequestParam("orderId") Long orderId) {
|
|
|
+ public BaseResult<OrderDetailVo> detail(@RequestParam("orderId") Long orderId) {
|
|
|
|
|
|
return BaseResult.success(orderService.getOrderDetail(orderId));
|
|
|
}
|
|
|
|
|
|
|
|
|
@ApiOperation("兑换")
|
|
|
+ @ApiResponses({
|
|
|
+ @ApiResponse(code=100,message = "操作成功")
|
|
|
+ })
|
|
|
@PostMapping(value = "/addOrder")
|
|
|
@AccessToken
|
|
|
- public BaseResult addOrder(@Validated @RequestBody OrderVo order) {
|
|
|
+ public BaseResult<Long> addOrder( @RequestBody OrderCreateVo order) {
|
|
|
order.setMemberId(getLoginId());
|
|
|
try {
|
|
|
if (order.getLineId() == null) {
|
|
@@ -74,13 +75,9 @@ public class OrderApi extends BaseController {
|
|
|
|
|
|
|
|
|
@ApiOperation("添加订单联系人")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(required = true, paramType = "query", name = "orderId", value = " 订单id"),
|
|
|
- @ApiImplicitParam(required = true, paramType = "query", name = "travelerList", value = "出行人[{\"address\":\"户籍\",\"contactMobile\":\"联系电话\",\"contactName\":\"姓名\",\"idCard\":\"身份证号码\",\"params\":{},\"sex\":\"0 男 1女\"},..]")
|
|
|
- })
|
|
|
@PostMapping(value = "/addOrderContact")
|
|
|
@AccessToken
|
|
|
- public BaseResult addOrderContact(@RequestBody OrderVo order) {
|
|
|
+ public BaseResult addOrderContact(@RequestBody OrderMemberVo order) {
|
|
|
if (order.getOrderId() == null) {
|
|
|
return BaseResult.error("订单id不能为空");
|
|
|
}
|
|
@@ -137,7 +134,7 @@ public class OrderApi extends BaseController {
|
|
|
})
|
|
|
@GetMapping(value = "/subTrip")
|
|
|
@AccessToken
|
|
|
- public BaseResult subTrip(@RequestBody OrderVo order) {
|
|
|
+ public BaseResult subTrip(@RequestBody OrderTravelVo order) {
|
|
|
try {
|
|
|
boolean result = orderService.subTrip(order);
|
|
|
return result ? BaseResult.success() : BaseResult.error("上传失败");
|