|
@@ -147,7 +147,7 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
|
|
|
|
|
String deviceId = iotParam.getDeviceId();
|
|
String deviceId = iotParam.getDeviceId();
|
|
|
expenseFlow.setDeviceId(deviceId);
|
|
expenseFlow.setDeviceId(deviceId);
|
|
|
- // 支付来源
|
|
|
|
|
|
|
+ // 支付来源 刷卡 二维码 刷脸
|
|
|
expenseFlow.setOrderFromType(iotParam.getOrderFromType());
|
|
expenseFlow.setOrderFromType(iotParam.getOrderFromType());
|
|
|
expenseFlow.setParam(iotParam);
|
|
expenseFlow.setParam(iotParam);
|
|
|
expenseFlow.setPaymentDeviceType(PaymentDeviceType.HxzConsumTransactions);
|
|
expenseFlow.setPaymentDeviceType(PaymentDeviceType.HxzConsumTransactions);
|
|
@@ -159,13 +159,13 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 钱包支付
|
|
|
|
|
|
|
+ * 订单支付
|
|
|
*
|
|
*
|
|
|
* @param entity
|
|
* @param entity
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@Transactional
|
|
@Transactional
|
|
|
- public ResultContent<ExpenseFlow> walletPay(ExpenseFlow entity) {
|
|
|
|
|
|
|
+ public ResultContent<ExpenseFlow> orderPay(ExpenseFlow entity) {
|
|
|
if (entity.getVerifyParamIsSuccess() == null || !entity.getVerifyParamIsSuccess()) {
|
|
if (entity.getVerifyParamIsSuccess() == null || !entity.getVerifyParamIsSuccess()) {
|
|
|
// 参数失败
|
|
// 参数失败
|
|
|
entity.setIsPaySuccess(Boolean.FALSE);
|
|
entity.setIsPaySuccess(Boolean.FALSE);
|
|
@@ -175,6 +175,8 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
return ResultContent.buildSuccess(entity);
|
|
return ResultContent.buildSuccess(entity);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ PaymentType paymentType = entity.getPaymentType();
|
|
|
|
|
+ // 调用支付中心
|
|
|
CreateOrderParam param = new CreateOrderParam();
|
|
CreateOrderParam param = new CreateOrderParam();
|
|
|
param.setProjectOid(entity.getProjectOid());
|
|
param.setProjectOid(entity.getProjectOid());
|
|
|
param.setUserId(entity.getUserId());
|
|
param.setUserId(entity.getUserId());
|
|
@@ -182,11 +184,12 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
param.setSchoolId(entity.getSchoolOid());
|
|
param.setSchoolId(entity.getSchoolOid());
|
|
|
param.setTotal(entity.getPayAmount());
|
|
param.setTotal(entity.getPayAmount());
|
|
|
param.setOutTradeNo(entity.getPaymentNo());
|
|
param.setOutTradeNo(entity.getPaymentNo());
|
|
|
- param.setPaymentType(entity.getPaymentType());
|
|
|
|
|
- param.setDescription("刷卡消费");
|
|
|
|
|
|
|
+ param.setPaymentType(paymentType);
|
|
|
|
|
+ String desc = "消费";
|
|
|
|
|
+ param.setDescription(desc);
|
|
|
|
|
|
|
|
OperationLogsAddParam logsAddParam = initLog(entity.getUserId());
|
|
OperationLogsAddParam logsAddParam = initLog(entity.getUserId());
|
|
|
- logsAddParam.setTitle("刷卡消费");
|
|
|
|
|
|
|
+ logsAddParam.setTitle(desc);
|
|
|
logsAddParam.setDataId(entity.getPaymentNo());
|
|
logsAddParam.setDataId(entity.getPaymentNo());
|
|
|
entity.setPayStartTime(System.currentTimeMillis());
|
|
entity.setPayStartTime(System.currentTimeMillis());
|
|
|
ResultContent content = orderPayFeignService.createAndPay(param);
|
|
ResultContent content = orderPayFeignService.createAndPay(param);
|
|
@@ -335,8 +338,8 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
entity.setPaymentType(paymentType);
|
|
entity.setPaymentType(paymentType);
|
|
|
entity.setPaymentWay(paymentType.getRemark());
|
|
entity.setPaymentWay(paymentType.getRemark());
|
|
|
|
|
|
|
|
- // 刷卡支付 并且钱包支付
|
|
|
|
|
- if (paymentType == PaymentType.UserWallet && entity.getOrderFromType() == OrderFromType.Swipe) {
|
|
|
|
|
|
|
+ // 刷卡支付 并且钱包支付 paymentType == PaymentType.UserWallet &&
|
|
|
|
|
+ if (entity.getOrderFromType() == OrderFromType.Swipe) {
|
|
|
CardInfo cardInfo = cardInfoDao.findByCode(entity.getCardNo());
|
|
CardInfo cardInfo = cardInfoDao.findByCode(entity.getCardNo());
|
|
|
// 验证卡片
|
|
// 验证卡片
|
|
|
if (ObjectUtils.isEmpty(cardInfo)) {
|
|
if (ObjectUtils.isEmpty(cardInfo)) {
|