update 取现失败支付回调

This commit is contained in:
2023-08-08 14:24:04 +08:00
parent a4d78920e7
commit 7ca9ecd514

View File

@@ -953,10 +953,13 @@ public class OrderService {
// 支付撤销成功
} else if (AdapayEventEnum.cash_succeeded.getValue().equals(type)) {
cashSucceeded(data);
} else if (AdapayEventEnum.cash_failed.getValue().equals(type)) {
cashFailed(data);
}
}
/**
* adapay支付成功回调
* @param data
@@ -1083,4 +1086,17 @@ public class OrderService {
clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo);
}
/**
* 取现失败
* @param data
*/
private void cashFailed(String data) {
JSONObject jsonObject = JSON.parseObject(data);
String withdrawCode = jsonObject.getString("id");
// 通过取现id查询取现数据
ClearingWithdrawInfo clearingWithdrawInfo = clearingWithdrawInfoService.selectByWithdrawCode(withdrawCode);
clearingWithdrawInfo.setWithdrawStatus(Constants.TWO);
clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo);
}
}