|
|
@@ -5,6 +5,7 @@ import com.github.microservice.components.data.base.util.PageEntityUtil;
|
|
|
import com.github.microservice.models.hxz.ConsumTransactionsFullParam;
|
|
|
import com.github.microservice.models.hxz.ConsumTransactionsModel;
|
|
|
import com.github.microservice.models.hxz.ConsumTransactionsResult;
|
|
|
+import com.github.microservice.models.hxz.QRCodeTransactionModel;
|
|
|
import com.github.microservice.models.type.PaymentDeviceType;
|
|
|
import com.zhongshu.card.client.model.payment.ExpenseFlowCount;
|
|
|
import com.zhongshu.card.client.model.payment.ExpenseFlowModel;
|
|
|
@@ -242,6 +243,38 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 通过 付款码(二维码)支付接口 创建订单
|
|
|
+ * @param iotParam
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ResultContent<ExpenseFlow> createExpenseFlowByHxz(QRCodeTransactionModel iotParam) {
|
|
|
+ ExpenseFlow expenseFlow = new ExpenseFlow();
|
|
|
+
|
|
|
+ expenseFlow.setYear(DateUtils.paresTime(System.currentTimeMillis(), DateUtils.patternyyyy));
|
|
|
+ expenseFlow.setMonth(DateUtils.paresTime(System.currentTimeMillis(), DateUtils.patternMM));
|
|
|
+ expenseFlow.setPaymentTime(DateUtils.paresTime(System.currentTimeMillis(), DateUtils.patternyyyySSS));
|
|
|
+
|
|
|
+ // 消费订单号
|
|
|
+// expenseFlow.setOrderNo(iotParam.getOrder());
|
|
|
+// expenseFlow.setCardNo(iotParam.getCardNo());
|
|
|
+ String paymentNo = NextNoUtil.getNextPaymentNo(null);
|
|
|
+ // 支付订单号
|
|
|
+ expenseFlow.setPaymentNo(paymentNo);
|
|
|
+ BigDecimal amount = CommonUtil.turnMoney2BigDecimal(iotParam.getAmount());
|
|
|
+ expenseFlow.setPayAmount(amount);
|
|
|
+
|
|
|
+ String deviceId = iotParam.getDeviceId();
|
|
|
+ // 设备信息
|
|
|
+ expenseFlow.setDeviceId(deviceId);
|
|
|
+ // 支付方式
|
|
|
+ expenseFlow.setPaymentWay(iotParam.getPaymentType().getRemark());
|
|
|
+ expenseFlow.setParam(iotParam);
|
|
|
+ expenseFlow.setPaymentDeviceType(PaymentDeviceType.HxzConsumTransactions);
|
|
|
+ expenseFlowDao.save(expenseFlow);
|
|
|
+ return ResultContent.buildSuccess(expenseFlow);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询构建支付返回结果
|
|
|
*
|
|
|
@@ -328,6 +361,11 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
ExpenseFlowModel model = new ExpenseFlowModel();
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
BeanUtils.copyProperties(entity, model);
|
|
|
+
|
|
|
+ // 卡片信息
|
|
|
+
|
|
|
+ // 用户信息
|
|
|
+
|
|
|
}
|
|
|
return model;
|
|
|
}
|