cloudroam
2024-11-04 7a5095c394467dacd285009ab88ccf46efcc4732
src/main/java/com/mzl/flower/web/customer/OrderCustomerController.java
@@ -11,6 +11,7 @@
import com.mzl.flower.dto.response.payment.OrderDTO;
import com.mzl.flower.dto.response.payment.OrderItemListDTO;
import com.mzl.flower.dto.response.payment.OrderListDTO;
import com.mzl.flower.entity.payment.Order;
import com.mzl.flower.service.payment.OrderService;
import com.mzl.flower.service.payment.UserPaymentV3Service;
import io.swagger.annotations.Api;
@@ -68,7 +69,8 @@
            @ApiImplicitParam(name = "id", value = "订单id", required = true, dataType = "String", paramType = "query")
    })
    public ResponseEntity<ReturnDataDTO<?>> confirmOrderReceive(String id){
        orderService.confirmOrderReceive(id);
        Order o = orderService.confirmOrderReceive(id);
        orderService.processAfterReceive(o);
        return returnData(R.SUCCESS.getCode(), null);
    }
@@ -90,7 +92,7 @@
            @ApiImplicitParam(name = "id", value = "订单id", required = true, dataType = "String", paramType = "query"),
    })
    @ApiOperation(value = "退款")
    public ResponseEntity<ReturnDataDTO> refundOrder(String id) {
    public ResponseEntity<ReturnDataDTO> refundOrder(String id) throws Exception {
        orderService.refundCheck(id);
        paymentV3Service.refundOrder(id);
        return returnData(R.SUCCESS.getCode(), null);
@@ -146,4 +148,19 @@
        orderService.deleteOrder(id);
        return returnData(R.SUCCESS.getCode(), null);
    }
    @GetMapping(value = "/copyOrder")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "订单id", required = true, dataType = "String", paramType = "query"),
    })
    @ApiOperation(value = "再来一单")
    public ResponseEntity<ReturnDataDTO> copyOrder(String id) {
        String message=orderService.copyOrder(id);
        return returnData(R.SUCCESS.getCode(),null, message);
    }
}