|
@@ -402,6 +402,7 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
if (ObjectUtils.isEmpty(expenseFlow)) {
|
|
if (ObjectUtils.isEmpty(expenseFlow)) {
|
|
|
return ResultContent.buildFail("订单不存在");
|
|
return ResultContent.buildFail("订单不存在");
|
|
|
}
|
|
}
|
|
|
|
|
+ // 判断是否可以支付
|
|
|
OrderPayModel orderPayModel = isCanPay(expenseFlow);
|
|
OrderPayModel orderPayModel = isCanPay(expenseFlow);
|
|
|
if (!orderPayModel.isSuccess()) {
|
|
if (!orderPayModel.isSuccess()) {
|
|
|
return ResultContent.buildFail(orderPayModel.getPayMsg());
|
|
return ResultContent.buildFail(orderPayModel.getPayMsg());
|
|
@@ -424,7 +425,7 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
prepayParam.setTotal(expenseFlow.getPayAmount().longValue());
|
|
prepayParam.setTotal(expenseFlow.getPayAmount().longValue());
|
|
|
ResultContent<Object> resultContent = wechatPayService.prepay(prepayParam);
|
|
ResultContent<Object> resultContent = wechatPayService.prepay(prepayParam);
|
|
|
if (resultContent.isSuccess()) {
|
|
if (resultContent.isSuccess()) {
|
|
|
- value = resultContent.getCode();
|
|
|
|
|
|
|
+ value = resultContent.getContent();
|
|
|
} else {
|
|
} else {
|
|
|
return ResultContent.buildFail(resultContent.getMsg());
|
|
return ResultContent.buildFail(resultContent.getMsg());
|
|
|
}
|
|
}
|
|
@@ -1036,9 +1037,10 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
|
|
|
|
|
OrderState orderState = entity.getOrderState();
|
|
OrderState orderState = entity.getOrderState();
|
|
|
// 等待支付或支付失败,可以支付
|
|
// 等待支付或支付失败,可以支付
|
|
|
- if (orderState != OrderState.WAIT_PAYMENT || orderState != OrderState.PAID_ERROR) {
|
|
|
|
|
|
|
+ if (orderState != OrderState.WAIT_PAYMENT && orderState != OrderState.PAID_ERROR) {
|
|
|
return model.setFiled(String.format("订单状态:%S", orderState.getRemark()));
|
|
return model.setFiled(String.format("订单状态:%S", orderState.getRemark()));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (entity.getExpirationTime() <= System.currentTimeMillis()) {
|
|
if (entity.getExpirationTime() <= System.currentTimeMillis()) {
|
|
|
markOrderTimeOut(entity);
|
|
markOrderTimeOut(entity);
|
|
|
return model.setFiled("支付超时");
|
|
return model.setFiled("支付超时");
|