|
|
@@ -26,6 +26,7 @@ import com.zhongshu.card.client.service.payment.ExpenseFlowService;
|
|
|
import com.zhongshu.card.client.type.DataState;
|
|
|
import com.zhongshu.card.client.type.StatisticType;
|
|
|
import com.zhongshu.card.client.type.UserState;
|
|
|
+import com.zhongshu.card.client.type.payment.SettlementState;
|
|
|
import com.zhongshu.card.client.type.school.CardState;
|
|
|
import com.zhongshu.card.client.utils.DateUtils;
|
|
|
import com.zhongshu.card.server.core.dao.devices.DeviceInfoDao;
|
|
|
@@ -145,7 +146,8 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
expenseFlow.setPaymentDeviceType(PaymentDeviceType.HxzConsumTransactions);
|
|
|
|
|
|
expenseFlow.setOrderType(OrderState.WAIT_PAYMENT);
|
|
|
-
|
|
|
+ // 默认未结算状态
|
|
|
+ expenseFlow.setSettlementState(SettlementState.Unsettled);
|
|
|
// 验证参数、填充数据
|
|
|
commonVerifyExpenseFlow(expenseFlow);
|
|
|
return ResultContent.buildSuccess(expenseFlow);
|
|
|
@@ -173,7 +175,7 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
if (entity.getMode() == 0) {
|
|
|
entity.setOrderModeType(OrderModeType.Consume);
|
|
|
// 支付
|
|
|
- payCallService.pay(entity);
|
|
|
+ payCallService.payOrder(entity);
|
|
|
expenseFlowDao.save(entity);
|
|
|
} else if (entity.getMode() == 2) {
|
|
|
// 查询余额模式
|
|
|
@@ -750,6 +752,9 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
if (expenseFlow.getOrderType() != OrderState.HAVE_PAID) {
|
|
|
return ResultContent.buildFail(String.format("未支付成功,不能退款"));
|
|
|
}
|
|
|
+ if (expenseFlow.getSettlementState() == SettlementState.AlreadySettled) {
|
|
|
+ return ResultContent.buildFail("订单已结算,不能退款");
|
|
|
+ }
|
|
|
ResultContent resultContent = payCallService.refund(expenseFlow, param);
|
|
|
if (resultContent.isFailed()) {
|
|
|
return ResultContent.buildFail(resultContent.getMsg());
|