Prechádzať zdrojové kódy

红包状态未同步,定时去查询

xgb 1 mesiac pred
rodič
commit
d32bdacb5a

+ 4 - 9
fs-service/src/main/java/com/fs/course/service/impl/FsCourseRedPacketLogServiceImpl.java

@@ -28,9 +28,7 @@ import com.fs.his.mapper.FsUserMapper;
 import com.fs.his.param.WxSendRedPacketParam;
 import com.fs.his.service.IFsStorePaymentService;
 import com.fs.system.service.ISysConfigService;
-import com.github.binarywang.wxpay.bean.transfer.QueryTransferBatchesRequest;
-import com.github.binarywang.wxpay.bean.transfer.QueryTransferBatchesResult;
-import com.github.binarywang.wxpay.bean.transfer.TransferBillsResult;
+import com.github.binarywang.wxpay.bean.transfer.*;
 import com.github.binarywang.wxpay.config.WxPayConfig;
 import com.github.binarywang.wxpay.exception.WxPayException;
 import com.github.binarywang.wxpay.service.TransferService;
@@ -453,19 +451,16 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
                     logger.error("【红包处理】获取批次号失败,FsCourseRedPacketLog-log_id:{}",redPacket.getLogId());
                     continue;
                 }
-                QueryTransferBatchesRequest request = new QueryTransferBatchesRequest();
-                request.setBatchId(batchId);
-                request.setNeedQueryDetail(false);
 
                 try {
-                    QueryTransferBatchesResult queryRedPacketResult = transferService.transferBatchesBatchId(request);
+                    TransferBillsGetResult queryRedPacketResult = transferService.getBillsByTransferBillNo(redPacket.getBatchId());
                     logger.info("FsCourseRedPacketLog-log_id:{},【红包处理】查询批次结果:{}",redPacket.getLogId(),queryRedPacketResult);
-                    if(queryRedPacketResult!=null && queryRedPacketResult.getTransferBatch()!=null && "SUCCESS".equals(queryRedPacketResult.getTransferBatch().getBatchStatus())){
+                    if(queryRedPacketResult!=null && "SUCCESS".equals(queryRedPacketResult.getState())){
                         FsCourseRedPacketLog fsCourseRedPacketLog=new FsCourseRedPacketLog();
                         fsCourseRedPacketLog.setLogId(redPacket.getLogId());
                         fsCourseRedPacketLog.setStatus(1); // 已发送
                         fsCourseRedPacketLog.setUpdateTime(new Date());
-                        updateFsCourseRedPacketLog(redPacket);
+                        updateFsCourseRedPacketLog(fsCourseRedPacketLog);
                     }
                 } catch (WxPayException e) {
                     throw new RuntimeException(e);