|
|
@@ -2,6 +2,7 @@ package com.zswl.dataservice.service.payment;
|
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.github.microservice.models.hxz.*;
|
|
|
+import com.github.microservice.models.type.PaymentType;
|
|
|
import com.zswl.dataservice.dao.mqtt.DeviceInfoDao;
|
|
|
import com.zswl.dataservice.domain.ExecuteAnnotationService;
|
|
|
import com.zswl.dataservice.domain.ExecuteAnnotationServiceMethod;
|
|
|
@@ -131,10 +132,22 @@ public class HxzService extends SuperService {
|
|
|
@ExecuteAnnotationServiceMethod(value = "QRCodeTransaction", remark = "云版消费机 2.7 付款码(二维码)支付接口")
|
|
|
public ResultContent<Object> QRCodeTransaction(String dataStr) {
|
|
|
QRCodeTransactionModel params = JSONUtil.toBean(dataStr, QRCodeTransactionModel.class);
|
|
|
+ // 根据QR判断支付模式
|
|
|
+ params.setPaymentType(PaymentType.WxQrCode);
|
|
|
|
|
|
- QRCodeTransactionResult result = new QRCodeTransactionResult();
|
|
|
-
|
|
|
- return ResultContent.buildSuccess(result);
|
|
|
+ QRCodeTransactionResult ret = new QRCodeTransactionResult();
|
|
|
+ APIResponseModel resultContent = apiRequestService.sendFullCardAPI(
|
|
|
+ FullCardAPIConfig.QRCodeTransaction, params);
|
|
|
+ if (resultContent.isSuccess()) {
|
|
|
+ // 请求成功
|
|
|
+ QRCodeTransactionFullResult fullResult = resultContent.toBean(QRCodeTransactionFullResult.class);
|
|
|
+ ret = fullResult.getModel();
|
|
|
+ } else {
|
|
|
+ // 失败
|
|
|
+ ret.setStatus(0);
|
|
|
+ ret.setMsg(resultContent.getMsg());
|
|
|
+ }
|
|
|
+ return ResultContent.buildSuccess(ret);
|
|
|
}
|
|
|
|
|
|
@ExecuteAnnotationServiceMethod(value = "TransactionInquiry", remark = "云版消费机 2.8.二维码支付结果查询接口")
|