|
|
@@ -34,7 +34,6 @@ import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import ma.glasnost.orika.MapperFacade;
|
|
|
-import org.springframework.core.annotation.OrderUtils;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -47,8 +46,8 @@ import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
@RestController
|
|
|
-@RequestMapping("/p/myOrder")
|
|
|
-//@RequestMapping("/myOrder")
|
|
|
+//@RequestMapping("/p/myOrder")
|
|
|
+@RequestMapping("/myOrder")
|
|
|
@Api(tags = "我的订单接口")
|
|
|
@AllArgsConstructor
|
|
|
public class MyOrderController {
|
|
|
@@ -83,8 +82,9 @@ public class MyOrderController {
|
|
|
@ApiOperation(value = "订单详情信息", notes = "根据订单号获取订单详情信息")
|
|
|
@ApiImplicitParam(name = "orderNumber", value = "订单号", required = true, dataType = "String")
|
|
|
public ResponseEntity<OrderShopDto> orderDetail(@RequestParam(value = "orderNumber", required = true) String orderNumber) {
|
|
|
-
|
|
|
- String userId = SecurityUtils.getUser().getUserId();
|
|
|
+ System.out.println("---------------111");
|
|
|
+// String userId = SecurityUtils.getUser().getUserId();
|
|
|
+ String userId = "ecf5703f3e284f7fa0845244be4018fc";
|
|
|
// String userId = "1";
|
|
|
OrderShopDto orderShopDto = new OrderShopDto();
|
|
|
|
|
|
@@ -188,9 +188,9 @@ public class MyOrderController {
|
|
|
for (OrderItemDto orderItemDto : orderItemDtoList) {
|
|
|
if (Objects.equals(orderItemDto.getOrderItemId(), orderRefund.getOrderItemId())) {
|
|
|
orderItemDto.setRefundSn(orderRefund.getRefundSn());
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
orderShopDto.setOrderItemDtos(orderItemDtoList);
|
|
|
@@ -199,6 +199,7 @@ public class MyOrderController {
|
|
|
for (OrderItemDto orderItem : orderShopDto.getOrderItemDtos()) {
|
|
|
total = Arith.add(total, orderItem.getProductTotalAmount());
|
|
|
totalNum += orderItem.getProdCount();
|
|
|
+ orderItem.setRefundCount(orderItemService.refundCount(orderItem.getOrderItemId()));
|
|
|
}
|
|
|
orderShopDto.setTotal(total);
|
|
|
orderShopDto.setTotalNum(totalNum);
|