|
|
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import shop.alien.entity.result.R;
|
|
|
import shop.alien.entity.store.LawyerConsultationOrder;
|
|
|
import shop.alien.entity.store.dto.LawyerConsultationOrderDto;
|
|
|
+import shop.alien.entity.store.dto.PayStatusRequest;
|
|
|
import shop.alien.entity.store.vo.LawyerConsultationOrderVO;
|
|
|
import shop.alien.store.service.LawyerConsultationOrderService;
|
|
|
import shop.alien.store.service.OrderExpirationService;
|
|
|
@@ -235,18 +236,18 @@ public class LawyerConsultationOrderController {
|
|
|
@ApiOperationSupport(order = 10)
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "orderNumber", value = "订单编号", dataType = "String", paramType = "query", required = true),
|
|
|
- @ApiImplicitParam(name = "paymentStatus", value = "支付状态, 0:未支付, 1:已支付", dataType = "Integer", paramType = "query", required = true),
|
|
|
- @ApiImplicitParam(name = "orderStatus", value = "订单状态, 0:待支付, 1:已支付, 2:进行中, 3:已完成, 4:已取消", dataType = "Integer", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "orderStatus", value = "订单状态, 0:待支付, 1:已支付, 2:进行中, 3:已完成, 4:已取消", dataType = "Integer", paramType = "query", required = true),
|
|
|
+ @ApiImplicitParam(name = "paymentStatus", value = "支付状态, 0:未支付, 1:已支付", dataType = "Integer", paramType = "query", required = true)
|
|
|
})
|
|
|
@PostMapping("/payStatus")
|
|
|
- public R<LawyerConsultationOrderDto> payStatus(String orderNumber , Integer paymentStatus, Integer orderStatus) {
|
|
|
- log.info("LawyerConsultationOrderController.consultNow?id{},paymentStatus{},orderStatus{}",
|
|
|
- orderNumber, paymentStatus, orderStatus);
|
|
|
+ public R<LawyerConsultationOrderDto> payStatus(@RequestBody PayStatusRequest request) {
|
|
|
+ log.info("LawyerConsultationOrderController.payStatus?orderNumber={},paymentStatus={},orderStatus={}",
|
|
|
+ request.getOrderNumber(), request.getPaymentStatus(), request.getOrderStatus());
|
|
|
//如果订单已支付,关闭redis中的记时
|
|
|
- if (paymentStatus == 1){
|
|
|
- orderExpirationService.cancelOrderPaymentTimeout(orderNumber);
|
|
|
+ if (request.getPaymentStatus() != null && request.getPaymentStatus() == 1){
|
|
|
+ orderExpirationService.cancelOrderPaymentTimeout(request.getOrderNumber());
|
|
|
}
|
|
|
- return consultationOrderService.payStatus(orderNumber, paymentStatus, orderStatus);
|
|
|
+ return consultationOrderService.payStatus(request);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("查询根据用户id查询订单")
|