|
@@ -2,6 +2,7 @@ package com.fs.store.controller;
|
|
|
|
|
|
import com.fs.FSAdminApplication;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
+import com.fs.common.exception.CustomException;
|
|
|
import com.fs.huifuPay.dto.*;
|
|
|
import com.fs.store.domain.FsCouponSchedule;
|
|
|
import com.fs.store.domain.FsMiniprogramSubNotifyTask;
|
|
@@ -194,5 +195,30 @@ public class FsStorePaymentControllerTest {
|
|
|
miniProgramSubTask.notifyMiniAppSub();
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ public void queryOrder() throws Exception {
|
|
|
+ String payCode = "1908055054582022144";
|
|
|
+ FsStorePayment payment = fsStorePaymentService.selectFsStorePaymentByCode(payCode);
|
|
|
+
|
|
|
+ RequestDTO<QueryOrderRestDTO> requestDTO = new RequestDTO<>();
|
|
|
+
|
|
|
+ QueryOrderRestDTO queryOrderRestDTO = new QueryOrderRestDTO();
|
|
|
+ queryOrderRestDTO.setOrderFlowNo(payment.getTradeNo());
|
|
|
+ TzConfigInfoDTO tzConfigInfoDTO = TzConfigUtils.getConfig();
|
|
|
+
|
|
|
+ queryOrderRestDTO.setPlatMerCstNo(tzConfigInfoDTO.getPlatMerCstNo());
|
|
|
|
|
|
+ requestDTO.setReqBody(queryOrderRestDTO);
|
|
|
+ requestDTO.setReqHeader(TzReqHeaderDTO.getInstance(payment.getPayCode()));
|
|
|
+
|
|
|
+ TzReqResultDTO<QueryOrderInfoDTO> resultDTO = tzBankService.payQueryOrder(requestDTO);
|
|
|
+ log.info("查询结果: {}",resultDTO);
|
|
|
+ String retCode = resultDTO.getRetCode();
|
|
|
+ if(!retCode.equals("00000000")){
|
|
|
+ log.info("台州银行支付回调查询失败{}",resultDTO);
|
|
|
+ throw new CustomException("台州银行支付回调查询失败! msg="+resultDTO.getRetCode());
|
|
|
+ }
|
|
|
+ QueryOrderInfoDTO body = resultDTO.getBody();
|
|
|
+
|
|
|
+ }
|
|
|
}
|