|
@@ -2,6 +2,7 @@ package com.leromro.core.controller;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.leromro.common.core.domain.R;
|
|
@@ -13,16 +14,14 @@ import com.leromro.core.domain.SecondOrder;
|
|
|
import com.leromro.core.domain.VolunteerInfo;
|
|
|
import com.leromro.core.domain.dto.OrderRequestDTO;
|
|
|
import com.leromro.core.domain.dto.UserOrderReviewDTO;
|
|
|
-import com.leromro.core.domain.vo.MainOrdersVO;
|
|
|
-import com.leromro.core.domain.vo.OrdersInfoVO;
|
|
|
-import com.leromro.core.domain.vo.VolunteerInfoVO;
|
|
|
-import com.leromro.core.domain.vo.webMainOrderListVO;
|
|
|
+import com.leromro.core.domain.vo.*;
|
|
|
import com.leromro.core.service.IAddressService;
|
|
|
import com.leromro.core.service.IMainOrderService;
|
|
|
import com.leromro.core.service.ISecondOrderService;
|
|
|
import com.leromro.core.service.IVolunteerInfoService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import com.leromro.common.annotation.Log;
|
|
@@ -73,16 +72,6 @@ public class OrdersController extends BaseController {
|
|
|
return R.ok(list);
|
|
|
}
|
|
|
|
|
|
-/* @ApiOperation("用户查询小订单列表")
|
|
|
- @GetMapping("/secondOrderList")
|
|
|
- public R<List<SecondOrder>> selectSecondOrderList(String orderId) {
|
|
|
- startPage();
|
|
|
- Long userId = SecurityUtils.getUserId();
|
|
|
- QueryWrapper<SecondOrder> wrapper = new QueryWrapper<>();
|
|
|
- wrapper.eq("order_id", orderId).eq("user_id", userId);
|
|
|
- List<SecondOrder> list = secondOrderService.list(wrapper);
|
|
|
- return R.ok(list);
|
|
|
- }*/
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -121,7 +110,32 @@ public class OrdersController extends BaseController {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 用户点击完成订单 , 根据评价算钱。
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "用户评价小订单",notes = "传入对象参数 包含: seconderId, 四个score, userReview, userPicture")
|
|
|
+ @PostMapping("/userFinishOrder")
|
|
|
+ public AjaxResult userFinish (@RequestBody UserOrderReviewDTO reviewDTO) {
|
|
|
|
|
|
+ secondOrderService.userFinish(reviewDTO);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 管理端 订单列表查询
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "管理端订单详情信息查询",notes = "订单mainOrderId")
|
|
|
+ @GetMapping("/web/orderInfo/{mainOrderId}")
|
|
|
+ public R<WebMainOrdersInfoVO> webOrderInfo (@PathVariable String mainOrderId) {
|
|
|
+
|
|
|
+ MainOrders mainOrders = mainOrderService.getById(mainOrderId);
|
|
|
+ List<SecondOrder> secondOrderList = secondOrderService.list(new LambdaQueryWrapper<SecondOrder>().eq(SecondOrder::getMainOrderId, mainOrderId));
|
|
|
+ WebMainOrdersInfoVO webMainOrdersInfoVO = new WebMainOrdersInfoVO();
|
|
|
+ BeanUtils.copyProperties(mainOrders,webMainOrdersInfoVO);
|
|
|
+ webMainOrdersInfoVO.setSecondOrderList(secondOrderList);
|
|
|
+ return R.ok(webMainOrdersInfoVO);
|
|
|
+ }
|
|
|
/*
|
|
|
*/
|
|
|
/**
|
|
@@ -139,53 +153,10 @@ public class OrdersController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 用户点击完成订单 , 根据评价算钱。
|
|
|
- */
|
|
|
- @ApiOperation(value = "用户评价小订单",notes = "传入对象参数 包含: seconderId, score, userReview, userPicture")
|
|
|
- @PostMapping("/userFinishOrder")
|
|
|
- public AjaxResult userFinish (@RequestBody UserOrderReviewDTO reviewDTO) {
|
|
|
-
|
|
|
- secondOrderService.userFinish(reviewDTO);
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 用户点击完成订单
|
|
|
- */
|
|
|
-/* @ApiOperation("用户点击完成主订单")
|
|
|
- @PostMapping("/userFinishOrder")
|
|
|
- public AjaxResult userFinish (String mainOrderID) {
|
|
|
- UpdateWrapper<MainOrders> updateWrapper = new UpdateWrapper<MainOrders>().eq("main_order_id", mainOrderID).set("order_status", 8);
|
|
|
- mainOrderService.update(updateWrapper);
|
|
|
- return AjaxResult.success();
|
|
|
- }*/
|
|
|
-
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 修改订单主
|
|
|
- */
|
|
|
-/* @ApiOperation("修改订单主")
|
|
|
- @PreAuthorize("@ss.hasPermi('system:orders:edit')")
|
|
|
- @Log(title = "订单主", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
- public AjaxResult edit(@RequestBody MainOrders orders)
|
|
|
- {
|
|
|
- return toAjax(lOrdersService.updateLOrders(orders));
|
|
|
- }*/
|
|
|
|
|
|
- /**
|
|
|
- * 删除订单主
|
|
|
- */
|
|
|
-/* @ApiOperation("删除订单主")
|
|
|
- @PreAuthorize("@ss.hasPermi('system:orders:remove')")
|
|
|
- @Log(title = "订单主", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{orderIds}")
|
|
|
- public R<Integer> remove(@PathVariable String[] orderIds)
|
|
|
- {
|
|
|
- return R.ok(lOrdersService.deleteLOrdersByOrderIds(orderIds));
|
|
|
- }*/
|
|
|
|
|
|
}
|