|
|
@@ -89,13 +89,15 @@ public class ApiWithdrawController {
|
|
|
new LambdaQueryWrapper<WithdrawInfoEntity>()
|
|
|
.eq(WithdrawInfoEntity::getBusinessCode, outBatchNo));
|
|
|
if (entity == null) {
|
|
|
- return "{\"code\":\"FAIL\",\"message\":\"订单不存在\"}";
|
|
|
+ return "{\"code\":\"SUCCESS\",\"message\":\"成功\"}";
|
|
|
}
|
|
|
if (!entity.getPaymentTerm().equals(WithdrawPaymentTermEnum.WECHAT.value())) {
|
|
|
- return "{\"code\":\"FAIL\",\"message\":\"订单类型不是微信支付\"}";
|
|
|
+ return "{\"code\":\"SUCCESS\",\"message\":\"成功\"}";
|
|
|
}
|
|
|
- if (!entity.getAuditState().equals(WithdrawAuditStateEnum.AUDIT_PASS.value())) {
|
|
|
- return "{\"code\":\"FAIL\",\"message\":\"订单状态不是审核通过\"}";
|
|
|
+ // 3. 状态校验
|
|
|
+ if (entity.getAuditState().equals(WithdrawAuditStateEnum.REMIT_SUCCESS.value()) ||
|
|
|
+ entity.getAuditState().equals(WithdrawAuditStateEnum.AUDIT_REFUSE.value())) {
|
|
|
+ return "{\"code\":\"SUCCESS\",\"message\":\"成功\"}"; // 已处理过,直接返回成功
|
|
|
}
|
|
|
// 微信回调返回的金额单位是分,需要转换为元后比较
|
|
|
BigDecimal successAmountYuan = new BigDecimal(notification.getSuccessAmount())
|