|
@@ -18,10 +18,12 @@ import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
|
import com.fs.live.domain.Live;
|
|
import com.fs.live.domain.Live;
|
|
|
import com.fs.live.domain.LiveOrder;
|
|
import com.fs.live.domain.LiveOrder;
|
|
|
|
|
+import com.fs.live.domain.LiveOrderPayment;
|
|
|
import com.fs.live.enums.LiveOrderCancleReason;
|
|
import com.fs.live.enums.LiveOrderCancleReason;
|
|
|
import com.fs.live.param.FsUserLiveOrderPayUParam;
|
|
import com.fs.live.param.FsUserLiveOrderPayUParam;
|
|
|
import com.fs.live.param.LiveOrderCancelParam;
|
|
import com.fs.live.param.LiveOrderCancelParam;
|
|
|
import com.fs.live.param.LiveOrderConfirmParam;
|
|
import com.fs.live.param.LiveOrderConfirmParam;
|
|
|
|
|
+import com.fs.live.service.ILiveOrderPaymentService;
|
|
|
import com.fs.live.service.ILiveOrderService;
|
|
import com.fs.live.service.ILiveOrderService;
|
|
|
import com.fs.live.vo.LiveOrderListVo;
|
|
import com.fs.live.vo.LiveOrderListVo;
|
|
|
import com.fs.store.domain.FsStoreOrder;
|
|
import com.fs.store.domain.FsStoreOrder;
|
|
@@ -35,6 +37,7 @@ import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -67,6 +70,8 @@ public class LiveOrderController extends AppBaseController
|
|
|
private IFsExpressService expressService;
|
|
private IFsExpressService expressService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private JwtUtils jwtUtils;
|
|
private JwtUtils jwtUtils;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ILiveOrderPaymentService liveOrderPaymentService;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Login
|
|
@Login
|
|
@@ -350,6 +355,7 @@ public class LiveOrderController extends AppBaseController
|
|
|
return liveOrderService.liveOrderUser(liveId);
|
|
return liveOrderService.liveOrderUser(liveId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Login
|
|
@Login
|
|
|
@ApiOperation("取消订单")
|
|
@ApiOperation("取消订单")
|
|
|
@PostMapping("/cancelOrder")
|
|
@PostMapping("/cancelOrder")
|
|
@@ -360,6 +366,13 @@ public class LiveOrderController extends AppBaseController
|
|
|
if (ObjectUtil.isNull(order)) {
|
|
if (ObjectUtil.isNull(order)) {
|
|
|
throw new CustomException("订单不存在");
|
|
throw new CustomException("订单不存在");
|
|
|
}
|
|
}
|
|
|
|
|
+ List<LiveOrderPayment> liveOrderPayments = liveOrderPaymentService.selectLiveOrderPaymentByOrderId(order.getOrderId());
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(liveOrderPayments)){
|
|
|
|
|
+ LiveOrderPayment liveOrderPayment = liveOrderPayments.get(0);
|
|
|
|
|
+ if(liveOrderPaymentService.queryHf(liveOrderPayment)){
|
|
|
|
|
+ return R.error("当前订单状态不为待支付,请刷新页面!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return liveOrderService.cancelOrder(order);
|
|
return liveOrderService.cancelOrder(order);
|
|
|
|
|
|
|
|
}
|
|
}
|