|
|
@@ -15,8 +15,8 @@ import com.fs.his.param.FsIntegralRedPacketLogParam;
|
|
|
import com.fs.his.service.IFsIntegralRedPacketLogService;
|
|
|
import com.fs.his.vo.FsIntegralRedPacketLogVo;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
+import com.github.binarywang.wxpay.bean.notify.WxPayTransferBatchesNotifyV3Result;
|
|
|
import com.github.binarywang.wxpay.bean.transfer.TransferBillsGetResult;
|
|
|
-import com.github.binarywang.wxpay.bean.transfer.TransferBillsNotifyResult;
|
|
|
import com.github.binarywang.wxpay.config.WxPayConfig;
|
|
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
|
|
import com.github.binarywang.wxpay.service.TransferService;
|
|
|
@@ -302,29 +302,26 @@ public class FsIntegralRedPacketLogServiceImpl extends ServiceImpl<FsIntegralRed
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public R syncErrorRedPacket(TransferBillsNotifyResult.DecryptNotifyResult result) {
|
|
|
- String state = result.getState();
|
|
|
- if ("FAIL".equals(state) || "CANCELLED".equals(state)) {
|
|
|
- String outBillNo = result.getOutBillNo();
|
|
|
- if (StringUtils.isNotBlank(outBillNo)) {
|
|
|
- FsIntegralRedPacketLog log = baseMapper.selectFsIntegralRedPacketLogByBatchNo(outBillNo);
|
|
|
- if (log!=null){
|
|
|
- if ("-1".equals(log.getStatus()) || "-2".equals(log.getStatus())){
|
|
|
- return R.ok();
|
|
|
- }
|
|
|
- log.setStatus("FAIL".equals(state)?"-1":"-2");
|
|
|
- log.setUpdateTime(new Date());
|
|
|
- log.setRemark("失败原因:" +result.getFailReason());
|
|
|
- if (StringUtils.isNotBlank(log.getBatchId())){
|
|
|
- log.setBatchId(log.getBatchId());
|
|
|
- }
|
|
|
- updateUser(log);
|
|
|
- log.setReturnedStatus(1);
|
|
|
- baseMapper.updateFsIntegralRedPacketLog(log);
|
|
|
+ public R syncErrorRedPacket(WxPayTransferBatchesNotifyV3Result.DecryptNotifyResult result) {
|
|
|
+ String outBillNo = result.getOutBatchNo();
|
|
|
+ if (StringUtils.isNotBlank(outBillNo)) {
|
|
|
+ FsIntegralRedPacketLog log = baseMapper.selectFsIntegralRedPacketLogByBatchNo(outBillNo);
|
|
|
+ if (log!=null){
|
|
|
+ if ("-1".equals(log.getStatus()) || "-2".equals(log.getStatus())){
|
|
|
return R.ok();
|
|
|
}
|
|
|
- return R.error("批次不存在");
|
|
|
+ log.setStatus("-1");
|
|
|
+ log.setUpdateTime(new Date());
|
|
|
+ log.setRemark("失败原因: 具体原因查询微信商户后台");
|
|
|
+ if (StringUtils.isNotBlank(log.getBatchId())){
|
|
|
+ log.setBatchId(log.getBatchId());
|
|
|
+ }
|
|
|
+ updateUser(log);
|
|
|
+ log.setReturnedStatus(1);
|
|
|
+ baseMapper.updateFsIntegralRedPacketLog(log);
|
|
|
+ return R.ok();
|
|
|
}
|
|
|
+ return R.error("批次不存在");
|
|
|
}
|
|
|
return R.error();
|
|
|
}
|