gongzuming
2024-10-14 58a8acceb63d52377da4b837e859f2e03d2bce1b
src/main/java/com/mzl/flower/web/payment/OrderController.java
@@ -11,7 +11,7 @@
import com.mzl.flower.dto.response.payment.*;
import com.mzl.flower.service.payment.DeliveryOrderService;
import com.mzl.flower.service.payment.OrderService;
import com.mzl.flower.service.payment.UserPaymentV3Service;
import com.mzl.flower.service.payment.UserPaymentSybService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -22,6 +22,7 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@RestController
@@ -35,7 +36,7 @@
    private OrderService orderService;
    @Autowired
    private UserPaymentV3Service paymentV3Service;
    private UserPaymentSybService paymentSybService;
    @Autowired
    private DeliveryOrderService deliveryOrderService;
@@ -51,7 +52,6 @@
    public ResponseEntity<ReturnDataDTO<Page<OrderPlatformListDTO>>> selectOrderList(Page page, OrderQueryDTO dto){
        return returnData(R.SUCCESS.getCode(), orderService.selectOrderPlatformList(page, dto));
    }
    @GetMapping("/list/view")
    @ApiOperation(value = "订单详情")
    @ApiImplicitParams({
@@ -88,7 +88,7 @@
    @GetMapping("/list/abnormal/process")
    @ApiOperation(value = "异常订单处理(不管有没有退款金额,建议都要处理)")
    public ResponseEntity<ReturnDataDTO> processLevelDown(String id) {
    public ResponseEntity<ReturnDataDTO> processLevelDown(String id) throws Exception {
        orderService.processAbnormalOrder(id);
        return returnData(R.SUCCESS.getCode(), null);
    }
@@ -175,9 +175,9 @@
            @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.refundCheckAdmin(id);
        paymentV3Service.refundOrder(id);
        paymentSybService.refundOrder(id);
        return returnData(R.SUCCESS.getCode(), null);
    }
@@ -188,4 +188,9 @@
        return returnData(R.SUCCESS.getCode(),null);
    }
    @GetMapping("/list/export")
    @ApiOperation(value = "订单导出")
    public void exportOrderDetail(HttpServletResponse response, OrderQueryDTO queryOrderDTO) {
        orderService.exportOrderDetail(response, queryOrderDTO);
    }
}